Short pieces of code to use in Template-files (from the Forum).
<?php returnPageContent(); ?>
Since 3.1 this Caching/Indexing function can be used to check the page content (example: conditionals).
<?php global $content; ?>
Since 3.1. Similar to returnPageContent() this can be used to check the page content.
<?php echo $data_index->author; ?>
<?php getPageField(return_page_slug(),'author'); ?>
<?php echo stripslashes(html_entity_decode($data_index->author, ENT_QUOTES, 'UTF-8') ); ?>
The last example is for output of Unicode characters.
<?php if ($template_file == 'name-of-template.php') { ...
If used in a component, first do:
global $template_file;
<?php if (return_page_slug() == 'contact') { ...
If for example you want to make a template ready for the Custom Title plugin but to work normally without it:
<title> <?php if (function_exists('get_custom_title_tag')) {echo(get_custom_title_tag());} else { get_page_clean_title(); } ?> </title>
Back to the GetSimple Wiki Contents Page