Test whether or not the page is the home page

You can test to see if the current page is the home page with following code.

 
{% if _page.isHome %}
{% endif %}

An example use case could be to include specific CSS for the home page. 

 
{% if _page.isHome %}
   <link type="text/css" rel="stylesheet" href="/path/to/file.css">
{% endif %}

Test and see if the page is not the home page.

{% if _page.isHome == false %}
    <p>This is not the home page.</p>
{% endif %}

An example could be to only include the breadcrumb text if the current page is not the home page.

 
{% if _page.isHome == false %}
    {{ _page.breadcrumb() }}
{% endif %}
This documentation is only for Aptuitiv CMS. Learn more.
Get Started With Aptuitiv