Download the PHP package ttree/outofbandrendering without Composer
On this page you can find all versions of the php package ttree/outofbandrendering. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ttree/outofbandrendering
More information about ttree/outofbandrendering
Files in ttree/outofbandrendering
Package outofbandrendering
Short Description A package to render Fusion Out of Band in complex application fun & easy
License MIT
Informations about the package outofbandrendering
Fusion Out of Band rendering helpers
This package provide some helpers to work with Fusion Out of Band rendering in Neos CMS
Package under development, API can change at any time
How to use ?
Edit your distribution and add the required routes:
-
name: 'Ttree.OutOfBandRendering'
uriPattern: '<TtreeOutOfBandRenderingSubroutes>'
subRoutes:
'TtreeOutOfBandRenderingSubroutes':
package: 'Ttree.OutOfBandRendering'
variables:
'defaultUriSuffix': ''
With this configuration you can access the URL endpoint at .
Check the Routes.yaml in this package, if you need a custom URL.
Make it work
The endpoint require two parameters:
- node: the full node path of the rendering node
- preset: the preset name, check below for information about Presets
You can create preset in two different ways, static presets in and dynamic presets with your own PHP implementation. A preset is mainly used to limit the Fusion path that can be rendered out of band.
Static Preset
To use static preset, just write something like this in your :
Ttree:
OutOfBandRendering:
presets:
'marketplace:version':
path: 'root<Neos.Fusion:Case>/neosMarketPlaceDocument<Neos.Fusion:Matcher>/element<Neos.MarketPlace:Package>/body<Neos.Fusion:Template>/content/main<Neos.Fusion:Array>/package<Neos.MarketPlace:Package>/versions<Neos.MarketPlace:VersionPreview>'
The key is your preset name, and the path the allowed Fusion path to be rendered.
Dynamic Preset
A dynamic preset is more flexible and allow you to generate the Fusion path dynamically based on the given node.
You need a object, the easy way is to extend the like this:
The force you to defined the following methods:
- PresetDefinitionInterface::getPriority: Return an integer to define the preset priority (higher has more priority, like in the Flow Framework PropertyMapper
- PresetDefinitionInterface::getName: Return the name of the preset (used in the endpoint URL)
- PresetDefinitionInterface::canHandle: Receive the current document node as argument, and allow you to add more logic to decide if a preset can handle the given node
- PresetDefinitionInterface::getFusionPath: Receive the current document node as argument, must return the Fusion path to render
What's next ?
- Implement authorization support
- Add JS module to support content loading (appending, replacing, infinite scrolling, ...)
Acknowledgments
Development sponsored by ttree ltd - neos solution provider.
We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us.
License
Licensed under MIT, see LICENSE