Every repository with this icon (
Every repository with this icon (
Common Theme Elements
Blocks
{% block content %}...{% endblock %}
Display the content of the post or page
Displaying Content
$post.title
Display the title of the Text post
$post.name
Display the name of a Link post
$post.id
Display the unique ID of the post
$post.url
Display the URL to the post
$post.body
Display the body of the Text feather
${ post.body | read_more }
Display the body of the Text feather separated at the <!--more--> break point
$post.description
Display the description of the Link or Audio feathers
${ post.description | read_more }
Display the description of the Link or Audio feathers separated at the <!--more--> break point
$post.caption
Display the description of the Video or Photo feathers
${ post.caption | read_more }
Display the description of the Video or Photo feathers separated at the <!--more--> break point
$post.status
Display the post status
$page.clean
Display the title of the page in a dirified format
$posts.prev_link
Display a link to the previous paginated page
$posts.next_link
Display a link to the next paginated page
$post.audio_player
Display the audio player for Audio feather
$post.dialogue
Display the dialogue from the Chat feather
Tags
$tag.name
Display the tag name
$tag.popularity
Display the number of posts with the assigned tag
${ post.tags | join(" ") }
Display a list of tags separated by spaces
Users & Registration
{% if visitor.logged_in %}...{% endif %}
Display the following if the user is logged in
$post.user.login
Display the post author username
$post.user.group.name
Display the post author’s group
Includes
{% include "content/sidebar.twig" %}
Include a Twig into your theme
{% if route.action == "index" %}
@ {% include “content/home-sidebar.twig” }@
@ { else }@
@ { include “content/other-sidebar.twig” }@
@{ endif %}@
Include a Twig that only displays on the Index or Home page.
Defining IDs & Class Names
misterbrandt said: In order to display certain tags as legal id’s or class names you will need to sanitize them using the following format:
${ post.user.login | escape | replace("foo", "bar") }
Custom Tag Page Content
To call custom content on a tag page:
- In the includes/config.yaml.php, under routes, add a value after the desired tag e.g.
freelance: tag;name=freelance;foo=true - In theme/pages/tag.twig add
{% if GET.foo %}<p>Custom content goes here</p>{% endif %}







