[Typo3] Main html template selector

Pierre Rouwens prouwens at infoglobe.ca
Sat Nov 26 20:21:02 CET 2005


Ok i've looked at the documentation modern template building...
But i still don't understand why this TS doesn't work ??

....
plugin.tx_rlmptmplselector_pi1 {
     templatePathMain = fileadmin/templates/
     templatePathSub = fileadmin/templates/sub/
}

page = PAGE
page.bodyTag = <body>
page.typeNum = 0
page.includeCSS.file1 = fileadmin/templates/css/general.css
page.includeCSS.file2 = fileadmin/templates/css/normal.css
page.includeCSS.file3 = fileadmin/templates/css/gros.css
page.includeCSS.file2.title = normal
page.includeCSS.file2.media = all
page.includeCSS.file3.title = gros
page.includeCSS.file3.media = all
page.includeCSS.file3.alternate = 1
page.headerData.10 = TEXT
page.headerData.10.value (
<script type="text/javascript" 
src="fileadmin/templates/scripts/styleswitcher.js"></script>
<script type="text/javascript" 
src="fileadmin/templates/scripts/multimenu.js"></script>
)
page.10 < plugin.tx_rlmptmplselector_pi1
page.10 {
    workOnSubpart = DOCUMENT_BODY
    subparts.contenu < styles.content.get
}

i don't wanna use the possibility to use different content template.

Do i use it anyway ?

Pierre

tapio wrote:
> Pierre Rouwens wrote:
> 
>> Hi T3ers,
>>
>> I need some advise, i'm using T3 3.8.1 and need to make possible to 
>> choose wich main html template tue user wanna use when create a page.
>> I've tried rlmp_tmplselector, it works fine but i can't use 
>> subparts.content < styles.content.get ...
>> I don't wanna use the possibility to choose a sub template... what can 
>> i do i've read the documentation but don't fond a way to achieve 
>> this... i can make a sub template and use it by default it's ok for 
>> the customer but i don't know what it must exactly contains ??
>> Any hints please
>>
>> Pierre
> 
> 
> 
> Look at the documentation of Modern Template Building I-II, but do 
> following changes:
> 
> ext: Auto-parser plugin (you found this in the documentation
> 
> # Configuring the Auto-Parser for main template:
> plugin.tx_automaketemplate_pi1 {
>   # Read the template file:
>   #content = FILE
>   #content.file = fileadmin/template/main/template_1.html
>   #content < plugin.tx_tmplselect_pi1  - replace with the following line
>   content < plugin.tx_rlmptmplselector_pi1
> ...
> }
> 
> ADD following:
> 
> 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 = 0
>     inheritSubTemplates = 1
> }
> 
> Note that you don't need to make the plugin 'tmplselect' (I made it 
> according to instructions). With changes above I got 'rlmptmplselector' 
> to work instead of 'tmplselect'.
> 
> I recommend to install then also 'stfl_tmpl2columns', when the
> columns match with the selected templates.
> 
> Works fine!



More information about the TYPO3-english mailing list