site
- site
- site.name
- site.id
- site.domain
- site.attachments
- site.trays
- site.post_types
- site.section_types
- site.element_types
- site.abstract_content_types
- site.content_types
- site.languages
- site.main_language
- site.content_objects
- site.content_objects.[:plural_content_type_name]
- site.elements.[:plural_content_type_name]
- site.[:plural_post_type_name]
site.domain
Returns the site’s primary full domain. E.g. www.my-plate-site.com.
The url attribute returns the url of the translation for the Post you are on. If there is no translation found, the root url for the language is returned. E.g. ‘/en’ for English, ‘/fr’ for French, and so on.
site.content_objects
Object that functions as a container for all generic content objects within your site, filtered by content type name.
content_objects is only callable as an attribute on the Site object.
content_objects.[:content_type_name]
Returns all Content Type kind: Generic Content for the given content type name in a collection.
E.g., when you have a content type with the (plural) name 'categories', site.content_objects.categories
returns a collection object with all categories in it.
site.content_objects.[:plural_content_type_name]
Returns all Generic Content Objects for the given content type name in a collection.
E.g., when you have a content type with the (plural) name 'categories', site.content_objects.categories
returns a collection object with all categories in it.
site.elements.[:plural_content_type_name]
Returns all Elements for the given content type name in a collection.
E.g., when you have a content type with the (plural) name ‘forms', site.elements.forms
returns a collection object with all 'Form’ elements in it.
You can also get all elements of a site in a collection: site.elements.all
site.[:plural_post_type_name]
Returns a collection with all posts (objects with the specified post type). E.g. {{ site.pages }}
returns a collection with all posts with the content type ‘page’.