WEBAPPS
Layouts
WebApp List Layouts
5min
syntax when placed onto a page or a template, this liquid displays the webapp items using the defined list layout {% include 'webapp' id '3' layout 'default' per page '20' sort type 'properties name' sort order 'asc' %} parameters parameter description id the webapp's id item ids output one or more webapp items for multiple ids comma separate them like so item ids '17559,17546' category ids output all items in one or more categories comma separate category ids to filter by multiple categories e g category ids '17559,17546' show all sub items default is 'true' when setting a category, this defines whether or not items should be shown if they are in sub categories layout default is 'default' layout values are relative to the folder layouts/webapps/my webapp (webapp 1)/\[layout name] per page defines the number of items outputted on the page show pagnation default is 'true' defines if items should be paginated when the per page is met ignore pagination default is 'false' defines if the output should ignore pagination in the url this is useful when outputting fixed webapp/module items in a sidebar, that don't need to be affected when moving page number sort type defines the type by which items are ordered this can be a field (e g sort type 'properties name' or sort type 'properties webapp field 1 2' ) or you can choose to sort by your array of 'item ids' if you are outputting specific items ( sort type 'item ids' ) sort order defines the order in which the type is sorted collection default is 'false' if you set it as collection 'true' then any layout is suppressed use wrapper default is 'false' if you set it as use wrapper 'true' then your layout will be layouts/webapps/my webapp (webapp 1)/\[layout name]/list/wrapper and the wrapper file needs to contains liquid to output the items {% include 'modules/siteglide system/get/get items', item layout 'item' %} sorting by custom fields when sorting by custom fields, you'll need to refer to the field by its custom field id e g to sort by the 2nd custom field created on webapp 1 , you should set the sort type to sort type "properties webapp 1 2" we use this syntax to access the field directly in the database, in order to help increase page load performance learn more about custom field ids here understanding custom field names and ids and when to use them default fields field name liquid tag description item name {{ this\['name'] }} name of the faq slug {{ this\['full slug'] }} url of the current item, relative to the layout weighting {{ this\['weighting'] }} weight of item, used for sorting release date {{ this\['release date'] }} release date of the item expiry date {{ this\['expiry date'] }} expiry date of the item enabled {{ this\['enabled'] }} enable/disable the item folder structure when you create a webapp, default files are automatically created for you webapp list layouts are stored in the following folder structure, which you can view via code editor layouts/webapps/my webapp (webapp id)/ within this folder you will find the following list/ the list layouts, used when outputting items as a section on a page default liquid the default list layout to create a custom layout file, right click on the list folder alternatively, you can edit the default file all layout files must use the liquid file extension, for example mylayout liquid any files created within this folder will automatically become available in the dropdown selector when outputting a webapp from the toolbox