get PageId in template

20. March 2013


global $objPage; 
$intId = $objPage->id; 
if($intId != 77) : ?>
<a href="{{link_url::77}}" class="button">Get it now!</a>
<?php endif; ?>
	

or with page_id with insertags


if ('{{env::page_id}}' == '2') { 
 echo "ID is 2"; 
}
  

¬ geschrieben von 7masod7 in contao

«

» 

Hinterlasse einen Kommentar

You must be logged in to post a comment.

Theme von BenediktRB • Powered by Wordpress • Abonniere den RSS Feed