Editing HTML
To edit the template's HTML code, you will visit the Customize page and then click the < / > icon to load the HTML template editor.
Your Dunked portfolio is controlled by a single HTML Template that uses the Twig Templating System. You can visit http://twig.sensiolabs.org/ for more information about working with Twig Templates.
To save the template changes, click Save HTML. If you wish to restore the original template HTML, click Reset HTML.
Outputting template variables
When you want for Twig output code, you will wrap the code in double parantheses {{ code to be output }}
. There are quite a few template variables that listed below with a brief description about what they output:
page_title
- The title of the current page.site_title
- The title of your Dunked Portfolio.page_description
- The description of the current page. The page description is created from the project/page description/content.logo
- The URL for your logo if uploaded.
There are also a number of multidimensional variables. That is, each variable contains a number of parameters that you can use to access information about the parent variable. For example, each project is a separate variable. In order to access information about the project variable you will use dot notation. For example, project.permalink
.
project
- When viewing the single project page views, the following parameters are accessible.project.id
- The id for the projectproject.assets
- The assets (images, audio, video) for the projectproject.permalink
- The URL for the projectproject.title
- The project titleproject.date_text
- The date assigned to the projectproject.client
- The project clientproject.role
- The user role for the projectproject.url
- The project URL as set by the userproject.tags
- The tags assigned to the project
tag
- When viewing tag archive pages, there are a number of parameters available for the tagtag.active
- Whether the current tag is active. This returns either true or false.tag.permalink
- The URL for the current tag archive URL
There are also a number of control statements that can be used to affect the flow of content. Within Twig, control statements are open and closed with {% conditional check %}
. If you open an if statement, you will need to close it with {% endif %}
:
is_home
is_project
is_page
is_tag