-
Notifications
You must be signed in to change notification settings - Fork 1
Cookbook 001
hertsch edited this page May 18, 2014
·
2 revisions
The page ID
of the home page - the page opened in browser if the blank URL of the website is typed into the address line of the browser - is stored in the constant PAGE_ID_HOME
and the page ID
of the current page is stored in the constant PAGE_ID
.
If both ID
's are identical, the current page is the home page.
Example php
:
<?php
if (PAGE_ID == PAGE_ID_HOME) {
// the current page is the home page
echo "<p>Welcome at xxx!</p>";
}
?>
Example twig
:
{% if PAGE_ID == PAGE_ID_HOME %}
{# the current page is the home page #}
<p>Welcome at xxx!</p>
{% endif %}
- If you spot a typo or want to contribute an article, a how-to or a tip, feel free to edit the Wiki directly
- If you you have any questions, please visit the phpManufaktur Support Forum
This Documentation is part of the kitFramework Project
© 2014 by phpManufaktur, kitFramework and TemplateTools are published under MIT license.