mhsdesign/neos-afxfiles

Last activity 26 days ago
  • 7
composer require mhsdesign/neos-afxfiles

Provides option to use AFX in separate template files.

1.0

Provides option to use AFX in separate template files.

Version
1.0
Type
neos-package
Release Date
28.06.2021 20:30:02
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
bac30a4089dae045ecf0b5686ad5b88217c4160a

MhsDesign.Neos.AfxFiles

Install via composer:

composer require mhsdesign/neos-afxfiles

Provides option to use AFX in separate template files.

Your Fusion Code:

prototype(Vendor.Site:Content.Stuff) < prototype(Neos.Neos:ContentComponent) {

    title = Neos.Neos:Editable {
        property = "title"
    }
    somOtherProp = 'Hello World'

    renderer = afxFile`resource://Vendor.Site/Private/Fusion/Content/Stuff/Stuff.afx`
}

Your AFX File e.g. ./DistributionPackages/Vendor.Site/Resources/Private/Fusion/Content/Stuff/Stuff.afx (you can use as file extension whatever you like e.g. .html .afx)

<section class="foo">
    <div class="bar">
        <h2>{props.title}</h2>
        <p>{props.somOtherProp}</p>
        <Vendor.Site:Content.SomeComponent/>
    </div>
</section>
The content of the readme is provided by Github