This is an old revision of the document!
<?php returnPageContent(); ?>
Применяется с версии 3.1 this Caching/Indexing function can be used to check the page content (example: conditionals).
<?php global $content; ?>
Применяется с версии 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') ); ?>
Последний пример служит для вывода Unicode-символов.
<?php if ($template_file == 'name-of-template.php') { ...
If used in a component, first do:
global $template_file;
<?php if (return_page_slug() == 'contact') { ...
Допустим, вам нужно, чтобы ваш шаблон использовал плагин Custom Title, а в случае отсутствия плагина создавал бы заголовок (title) страницы встроенной функцией GetSimple, требуемого результат можно добиться следующим способом:
<title> <?php if (function_exists('get_custom_title_tag')) {echo(get_custom_title_tag());} else { get_page_clean_title(); } ?> </title>
На главную Содержание