← Go back to Dunked

Welcome to the Dunked knowledgebase.
What can we help you with today?

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.

Edit Template HTML

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 project
    • project.assets - The assets (images, audio, video) for the project
    • project.permalink - The URL for the project
    • project.title - The project title
    • project.date_text - The date assigned to the project
    • project.client - The project client
    • project.role - The user role for the project
    • project.url - The project URL as set by the user
    • project.tags - The tags assigned to the project
  • tag - When viewing tag archive pages, there are a number of parameters available for the tag
    • tag.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
Last Updated: Apr 20, 2015 09:55PM BST
updates@dunked.com
http://assets2.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete