load
Loads specific types of objects and assigns them into a variable that is accessible in template. Valid types of objects are:
- mediaset - returns first mediaset found by attributes or no object when it cannot find any.
- mediasets - returns list of mediasets found by the attributes or empty list if none match.
Examples
Find mediaset by title and assign it to variable named my_gallery.
{% load mediaset to "my_gallery" title="Foobar" %} <h2>{{ my_gallery.title }}</h2> {% for photo in my_gallery.photos %}<img src="{{photo.medium_thumbnail_url}}" alt="" />{% endfor %}
- Basics
- Variables
- Filters
- Components
- Localization
- Keyboard shortcuts
- Objects
- Article
- Asset
- Blog
- Comment
- Element
- Language
- Mediaset
- Menu item
- Page
- Person
- Site
- Tag
- Data
- Tags
- addbutton
- assign
- blogcontext
- case
- capture
- commentform
- content
- contentblock
- cycle
- editable
- elementscontext
- for
- grouped
- if
- ifchanged
- image
- include
- load
- login
- loginblock
- menuadd
- menubtn
- menulink
- reorder
- rss_link
- stylesheet_link
- unless
- xcontent
- Examples
- Creating a navigation menu
- Creating language selection
- Blog page example
- Blog article example
- Complete page example
- Breadcrumbs
- Standard theme definition
- Elements listing
- Element page
- Components