@Deprecated class GroupingStrategy extends Object
The <head> merging strategy which groups like elements together.
The default behaviour of the layout dialect has historically been to place
the <title> element at the beginning of the <head> element
during the decoration process; an arbitrary design decision which made
development of this library easier. However, this runs against the
expectations of developers who wished to control the order of elements, most
notably the position of a <meta charset...> element.
This sorting strategy has been updated in 2.4.0 to retain this behaviour as backwards compatibility with the 2.x versions of the layout dialect, but is now deprecated and expected to be replaced by the GroupingRespectLayoutTitleStrategy sorter from version 3.x onwards.
| Type Params | Return Type | Name and description |
|---|---|---|
|
int |
findPositionForModel(IModel headModel, IModel childModel)Returns the index of the last set of elements that are of the same 'type' as the content node. |
Returns the index of the last set of elements that are of the same 'type' as the content node. eg: groups scripts with scripts, stylesheets with stylesheets, and so on.