====== Template Tags ======
Our themes have an extensive function list that developers and site owners can use to customize their GetSimple CMS themes. All these functions can be used anywhere in any theme file.
===== Echo / output functions =====
==get_page_content()==
Echos the page's content. No options.
==getPageContent(), returnPageContent()==
Echos or returns slug's content (slug's URI/name as option). Use this function if you want to display certain slug's content on all pages.
This function comes in handy for those, who want to have custom content boxes in template, and display them on f.e. homepage.
==get_page_excerpt( $n=200, $html=false )==
Echos an excerpt of the page's content. You can also set the length of the excerpt in characters and if HTML should be included in the excerpt. ''$length'' default is 200, ''$html'' default is FALSE. Since version 2.02
==get_page_meta_keywords( $echo=true )==
Echos/Returns the page's keywords and/or tags. No options.
==get_page_meta_desc( $echo=true )==
Echos/Returns the page's META description. No options.
==Not active yet:==
==get_page_meta_description( $echo=true )==
For v. 3.4
==get_page_title( $echo=true )==
Standardized alias for the get_page_meta_desc() function above.
Echos/Returns the page's title. No options.
==get_page_clean_title( $echo=true)==
Echos/Returns the page's title, stripped of all HTML. No options.
==get_page_slug( $echo=true)==
Echos/Returns the page's slug. No options. Example would be the word 'download' in the URL //get-simple.info/download//.
==get_page_url( $echo=false )==
Echos/Returns the page's full URL. Options: TRUE for "return", FALSE or blank for "echo". Example would be //get-simple.info///
==get_parent( $echo=true )==
This will echo/return the slug value of a particular page's parent
==get_page_date( $i="l, F jS, Y - g:i A",$echo=true )==
,
Echos the page's last saved date. Option is not needed, but can be used for formatting: use any string combination [[http://www.php.net/date|from PHP's date function]]. Default format is "l, F jS, Y - g:i A"
==get_header( $full=true )==
Echos the page's header. No options. This automatically creates the 2 meta tags (
'description', 'keywords', 'canonical' and 'generated'). If ''$full'' is FALSE, will not generate the ''''. Place this code within your theme's ''
Echos the page's footer. No options. This mainly is used to introduce a plugin hook that can be called at the bottom of any template footer. **Many plugins need this tag to be in place.**
==get_site_url( $echo=true )==
Echos/Returns the website's domain. No options. For example, this echos //get-simple.info// from any page on the GetSimple website.
==get_theme_url( $echo=true )==
Echos/Returns the website's theme directory URL. No options.
==get_site_name( $echo=true )==
Echos/Returns the website's title. Options: TRUE for "return", leave blank for "echo". Site name is taken from the settings page.
==Not active anymore:==
Echos the string "Powered by GetSimple Version". Option: Specify the text to prefix.
==get_component($id)==
Echos the component's contents. Required option is the component slug, which can be taken from the components page within the theme page.
==get_navigation( $currentpage = get_page_slug(false), $classPrefix = "" )==
Returns a list of pages that are added to the main menu from each of their edit screens. Required option is what is shown above. This creates a class of 'current' on the '',
This function outputs an array of menu specific data for developers to create their own menus instead of using the GS default ''get_navigation()'' function. If you pass it a slug of a specific page, you will only get that page's menu data.
===== Return Functions =====
==return_page_title()==
Returns the page's title. No options, since 2.0
==return_page_slug()==
Same as get_page_slug, but it returns the slug. No options. Can be used to make page-specific IDs for CSS styling.
==return_site_ver()==
Returns the version of GetSimple you are running. No options.
======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]]