List of available template properties?

I can’t seem to find a link in the documentation that provides a full list of available properties when creating twig template files. When reviewing antimatter’s template files I can see they are using lots of different variables but I don’t know which are specific to their theme or what is part of the base cms.

Some docs useful :



Twig Official

1 Like

Thank you, I found what I was looking for in the theme variables.

One more quick question if you have a moment. In the modular.html.twig there is a variable that is set using twig called show_onpage_menu, and it is set to true or false based on the file I believe, and if it does not exist then set to null. It does not exist in my file but the conditional twig blocks which check this variable are still executing for some reason. Any idea?

{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}

{% if show_onpage_menu %}
    <div class="onpage-working"></div>
    <ul class="navigation">
    {% for module in page.collection() %}
        {% set current_module = ( or module.activeChild) ? 'active' : '' %}
        <li class="{{ current_module }}"><a href="#{{ _self.pageLinkName( }}">{{ }}</a></li>
    {% endfor %}
    {% for mitem in %}
            <a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}">
                {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
                {{ mitem.text }}
    {% endfor %}
{% else %}
    {{  parent() }}
{% endif %}

title: Home
    items: '@self.modular'
        by: date
        dir: desc
body_classes: modular

Also I don’t get where this exists.

As per the documentation…

site object

An alias to the object. This represents the configuration as set in the site.yaml file.


title: Site Title
  name: Mystery Man
  email: 'someone@somewhere .com'
    description: 'example'


{% for mitem in %}
                <a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}">
                    {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
                    {{ mitem.text }}
        {% endfor %}

I check my site site.yaml file and it has no menu property, so where is this template file accessing from?

i’m not familiar with antimatter, but just test menu it works fine

see doc in Repo

    - text: Source
    - icon: twitter

Thank you for your reply.

Despite jumping in with both feet I am beginning to understand everything quite well, and making good progress on this custom theme. I am onto creating some custom fields for different module page templates.

Which… brings me to another question :slight_smile:.

Question: What is a good way to render custom css set by a user using the admin gui within the page template?

I have created a custom menu using a blueprint for my page template that lets the user select font sizes, colors, and set a background image. I am not what the most graceful method to include these in the page template is. I know liquid lets you create css files with a liquid extension, and twig syntax feels similar. Can I do something like custom.css.twig?