\AdaptiveContentIdentifiersAsTemplates
Secondary identifiers as templates
This extension renders the SecondaryIdentifier field from the AdaptiveContent extension
as a dropdown list of templates. It was primarily written for use with pre 1.0 versions
of the heyday/silverstripe-slices module, so may not be much use on its own.
Synopsis
class AdaptiveContentIdentifiersAsTemplates
extends DataExtension
{
- // methods
- public void populateDefaults()
- public void updateCMSFields()
- public array getAvailableSecondaryIdentifiers()
- public string getSecondaryIdentifierNice()
- public SSViewer getSSViewer()
- public array getTemplates()
- public mixed getTemplate()
- public string getTemplateClass()
- protected mixed getFirstLeafNode()
Hierarchy
Extends
- DataExtension
Methods
protected
- getFirstLeafNode() — Given a set of nested arrays, return the first leaf encountered
public
- getAvailableSecondaryIdentifiers() — Finds all available template based on the ClassName
- getSSViewer() — Tries to get an SSViewer based on the current configuration
- getSecondaryIdentifierNice() — Returns the secondary identifier in a nicer format if specified in config "secondaryIdentifierAsTemplatesMap"
- getTemplate()
- getTemplateClass() — Return the class name to prefix templates with
- getTemplates() — If classname "ComponentSlice", Identifier is "my-slice", and SecondaryIdentifier is "TwoColumn" then output: array("ComponentSlice_my-slice", "ComponentSlice_TwoColumn")
- populateDefaults() — If not is has default mode then populate defaults
- updateCMSFields() — Adds a field the the cms allowing the user to choose a secondary identifier based on templates