Short pieces of code to use in Template-files (from the Forum). ====== Template Code Snippets ====== ==returnPageContent()== Since 3.1 this Caching/Indexing function can be used to check the page content (example: conditionals). ==global $content;== Since 3.1. Similar to returnPageContent() this can be used to check the page content. ==output author== author; ?> author, ENT_QUOTES, 'UTF-8') ); ?> The last example is for output of Unicode characters. ==conditional by template== If used in a component, first do: global $template_file; ==conditional by page (slug)== ==template ready for but not requiring a plugin== If for example you want to make a template ready for the Custom Title plugin but to work normally without it: <?php if (function_exists('get_custom_title_tag')) {echo(get_custom_title_tag());} else { get_page_clean_title(); } ?> ======Links====== Back to the GetSimple Wiki [[:start|Contents Page]] ==Pages in this Section== ===Themes=== *[[themes:installation|Ready-Made Themes]] *[[themes:creation|Theme Creation]] *[[themes:template_tags|Complete Template Tags Reference]] *[[theme:template_code_snippets|Template Code Snippets]] *[[themes:tips|Theme Development Tips]] ==Other Pages and Links==