[TYPO3] Template question

Tapio Markula tapio.markula at dnainternet.net
Sat Jul 29 13:51:00 CEST 2006


Peter van Mourik wrote:
> Hi All,
> 
> I've been looking everywhere for a tutorial on this, but can't seem to find it..
> 
> I want to be able to select different pagetemplates (like the page_template_selector extension does), however when I'm using that I still get the 4 normal pagecontent types: left, normal, right and border.
> 
> How can I define a template with say 3 pagecontent type (normal, advertising and footer for example) and have the page show the three corresponding types. (while still being able to select different templates for different pages).

install both rlmp_tmplselector and stfl_tmpl2columns


> 
> Ie, in the template TS I now use:
> 
> [code snip]
> 
> plugin.tx_automaketemplate_pi1 { 

the result is like# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
   # Read the template file:
   content = FILE
   content < plugin.tx_rlmptmplselector_pi1
      # Here we define which elements in the HTML that
     # should be wrapped in subpart-comments:

   elements {
     BODY.all = 1
     BODY.all.subpartMarker = DOCUMENT_BODY

     HEAD.all = 1
     HEAD.all.subpartMarker = DOCUMENT_HEADER
     HEAD.rmTagSections = title

#DIV.id.headercontentshared=1
...
}

   #Prefix all relative paths with this value:
   relPathPrefix = fileadmin/template/main/
}

plugin.tx_rlmptmplselector_pi1 {

		# Template type. Default is "main". Allowed values: "main", "sub"
	templateType = main

		# Paths to search for templates in HTML file mode (vs. TS mode)		
	templatePathMain = fileadmin/template/main/
	templatePathSub = fileadmin/template/sub/

       # Refers to the default template file name to use
       # if no value is set for the current page
    defaultTemplateFileNameMain = {$defaultTemplateFileName}
    defaultTemplateFileNameSub = {$contentAreaTemplateFile}

       # Refers to the default template object to use
       # if no value is set for the current page
    defaultTemplateObjectMain = 10
    defaultTemplateObjectSub = 10

		# Contains TEMPLATE objects for TS mode (vs. external HTML file mode)
    templateObjects.main =
    templateObjects.sub =

		# Use the template selected earlier in the rootline of no template 
was selected	
	inheritMainTemplates = 1
	inheritSubTemplates = 0
}

If you want more columns than four, install tm_contentaccess
+ add some TypoScript (explained in the manual). Maybe
I add them when more columns enabled.



More information about the TYPO3-english mailing list