All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Templates & Navigation

From TYPO3Wiki
Jump to: navigation, search

<< Back to Administrators page



The aim of this document is to guide you thru the whole TYPO3 templating process. From Menu to Breadcrumbs to Last modification date. It's updated frequently by several people, so it's a HOT topic.

Using the already available documentation

There's already lots of documents available:



  • Definition
  • What is a template made up off
  • Difference between template for new site/extension template/template on next level
  • How is the template parsed and your final page build


Working with templates

  • Creating a new root template from scratch
  • Creating a new root template based on a html-file/template
  • Template on next-level
  • different templates for different pages/folders
  • Conditions in templates
  • “Last updated:” tutorial

Template tools

Constant editor

How to specify constant editor GUI in typoscript "constants.txt" file ?

This is what I could learn from class.t3lib_tsparser_ext.php about TypoScript-Constants Editor "Decription comments" syntax. This special comment syntax defines how your extension typoscript constants will be displayed (sorting and inputs type).

Example (from tt_news) :

 # cat=plugin.tt_news/file/80; type=file[html,htm,tmpl,txt]; label= RSS-News rss v2 Template File: XML template for RSS 2.0 feed
 rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl

...will display a file selector widget in the plugin.tt_news category, in the file section.


 #cat=(my category)(/$cat(/$subCat)?)?;type=$type;label=Message: Hello world !;

$cat :

 "basic"    =>  Constants of superior importance for the template-layout. 
 "menu"     =>  Menu setup. This includes fontfiles, sizes, background images. 
 "content"  =>  All constants related to the display of pagecontent elements
 "page"     =>  General configuration like metatags, link targets
 "advanced" =>  Advanced functions, which are used very seldomly.
 "all"      =>  All constants are put here also!

$subCat :

 "enable"    => Enable features
 "dims"      => Dimensions, widths, heights, pixels
 "file"      => Files
 "typo"      => Typography
 "color"     => Colors
 "links"     => Links and targets
 "language"  => Language specific constants
 "cheader"   => Content: 'Header'
 "cheader_g" => Content: 'Header', Graphical,
 "ctext"     => Content: 'Text'
 "cimage"    => Content: 'Image'
 "cbullets"  => Content: 'Bullet list'
 "ctable"    => Content: 'Table'
 "cuploads"  => Content: 'Filelinks'
 "cmultimedia" => Content: 'Multimedia'
 "cmailform" => Content: 'Form'
 "csearch"   => Content: 'Search'
 "clogin"    => Content: 'Login'
 "csplash"   => Content: 'Textbox'
 "cmenu"     => Content: 'Menu/Sitemap'
 "cshortcut" => Content: 'Insert records'
 "clist"     => Content: 'List of records'
 "cscript"   => Content: 'Script'
 "chtml"     => Content: 'HTML'

$type :

 "string" (default)
 "list" (selector => item,item,item)


  • Title
  • Sitetitle
  • Description
  • Resources
  • Setup
  • Constants

TypoScript Object Browser

Template Analyzer

CSS Styler

Edit whole template record


Other navigation

Breadcrumbs - Yahoo's like navigation


Is it possible to get the titles of the pages up the hierarchy to the root page, starting from the current content page and print this on load of the page to another frame's content?"

You need a HMENU with the .special property set to "rootline". Look at the TSREF, page 73:

 Creates a menu with pages from the "rootline" (see earlier in this reference)
 .range = [begin-level] | [end-level] (same way as you reference the .entryLevel for HMENU)
 .target_[0-x] targets

The code below creates a menu like this: Page level 1 > Page level 2 > Page level 3 > Page level 4 >

(The menu starts at level 1 and does NOT link to the current page (-2 is the level before). Further all pages on level 3 will have "page" as target and all other "_top")

TIP: If you want to have the HMENU in FrameA display the path to the current page of another frame FrameB, then remember to reload the frame with the HMENU when a new content page is loaded.

Code listing:

 page.2 = HMENU
 page.2.special = rootline
 page.2.special.range = 1|-2
 page.2.special.targets.3 = page
 page.2.1 = TMENU = _top
 page.2.1.wrap = <hr /> | <hr />
 page.2.1.NO {
   linkWrap = | >


Advanced templating with TemplaVoila