-
Notifications
You must be signed in to change notification settings - Fork 2
Lists
Often we will find the requirement to list data in our application. However not all lists are so simple. We may want to list article
elements as a type of an index. Or setup lists to contain collapsable content, among many other possibilities.
The {{>list}}
template is here for these needs.
Use this template to display numerous types of advanced lists.
##Usage
Place the {{>list}}
template where ever you intend to place a list. This template would not be used as much for such things as basic ul
, ol
or dl
but instead would be used for more advanced lists.
After you have placed the {{>list}}
template in your template file, you need to ensure your given template has the correct data parameters setup.
list: [{
type: 'article',
itemType: 'category', // Extends the `type: 'article'` template. Not required. See below.
paginate: true, //Default is false
perPage: 10, //if `paginate: true` will set the posts per page
style: 'striped', //Adds a specific class to the list container
}];
You will not be finished yet. We will need assign the correct paramters given the type
selected. The most important list parameter is the type
parameter. Options for type
include:
- article
- event
- location
- catalog
- toggle
By setting the type
parameter, we have selected the type of list to generate.
Then, each type
has it's own unique set of data parameters to meet.
Once these parameters are met, the final output is the list as desired.
See below for examples of data parameters for each list type.
This type has the option to extend it to a category style list. Or use the default with no itemType
set.
Lorem Ipsum.
Lorem Ipsum.
###Catalog Lorem Ipsum.
###Toggle Lorem Ipsum.