ColumnView¶
-
/libs/granite/ui/components/foundation/layouts/columnview
The layout to render the items as Miller columns. It implements foundation-selections vocabulary.
It has the following content structure at the layout resource:
- granite:LayoutsColumnView
- srcstringel
The URI Template that is returning the HTML response for pagination. It supports the following variables:
- offset
- The item offset of the current request.
- limit
- The item limit of the pagination.
- path
- The path of the item. This variable will be substituted in the server. It supports URITemplate Level 1 and 2
expansion:
{+path}
,{#path}
and{path}
.
e.g.
/a/b/c{.offset,limit}.html{+path}
- pathstringel
Path of the item that will be loaded. It will be substituted into the
src
in order to create the src URL for each column. If provided, the columns for the item to the root will be generated, otherwise, just the final column is generated.e.g.
${requestPathInfo.suffix}
- loadParentsboolean
true
to also load the parents of the current columns up to therootPath
;false
otherwise.
-
rootPathstringel
- /
Path of the root that is used to determine when we’ve reached the top-most folder.
- multiselectboolean
true
to allow the user to select multiple items in the same folder;false
otherwise.
- itemResourceTypestring
The resource type for each item.
- limitlong
The item limit of the pagination.
- stateIdstring
The id of the client-side state for this layout.
The following state is saved:
- The active layout
- See
layoutId
property.
- layoutIdstring
The name associated with this layout.
The client-side state with key
<stateId>.layoutId
will have the value of this name.This is useful when MultiLayouts is used, so that when the user refreshes the browser, the active layout can be restored by the MultiLayouts.
It will only be effective when
stateId
property is set.
- itempropstring
The
itemprop
attribute of each item.
- preview
The preview renderer. If there is no item and this resource is specified then it will be included instead.
The items of the layout are specified using ItemDataSource.
Example:
+ mycolumns - sling:resourceType = "granite/ui/components/foundation/container" + layout - sling:resourceType = "granite/ui/components/foundation/layouts/columnview" - stateId = "cq.sites.childpages" - layoutId = "columns" - src = "/a/b/c{.offset,limit}.html" + datasource - sling:resourceType = "my/datasource"