class FragmentExtensions extends Object
Extensions to Thymeleaf for working with fragments.
| Type | Name and description |
|---|---|
static String |
FRAGMENT_COLLECTION_KEY |
| Constructor and description |
|---|
FragmentExtensions() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static Map<String, List<IModel>> |
getFragmentCollection(ITemplateContext self, boolean fromDecorator)Retrieves the fragment collection for the current context. |
|
static void |
setLocalFragmentCollection(IElementModelStructureHandler self, ITemplateContext context, Map<String, List<IModel>> fragments, boolean fromDecorator)Set a fragment cache to contain any existing fragments, plus the given new fragments, with the same scope as setting a local variable. |
Retrieves the fragment collection for the current context.
Set a fragment cache to contain any existing fragments, plus the given new fragments, with the same scope as setting a local variable.
fragments
- The new fragments to add to the cache.fromDecorator
- Whether the call was from DecorateProcessor, used for determining
if a new fragment collection should be used and the order of collected
fragments.Groovy Documentation