[TYPO3] Problem with template selector (rlmptmplselector)
Luis Flávio Seelig
lflavios at gmail.com
Mon Aug 18 08:21:16 CEST 2008
Hi list,
I'm searching internet and documentations for some time (more than three
weeks) and can't find any clue about this issue. I'm working on trial and
error basis now, so I give up. I'm trying to use automaketemplate with
rlmptmplselector. Already read MTB documentation and understand (not fully,
I'm afraid) the theory, my code works, but not properly.
The problem is that the "page" marker and the "envelope" marker (on the HTML
code bellow) vanish when the page render. The page properties shows the
rlmptmplselector combos (main and sub templates) correctly, but is not
working changing the page templates.
Follow a resume (only the interest parts) of the automaketemplate TS, the
rlmptmplselector and the HTML pages. The TS'a are included in the main setup
in this order: automaketemplate, menus, rlmptmplselector, another objects.
automaketemplate TS
---------------------
plugin.tx_automaketemplate_pi1 {
content = FILE
content.file = fileadmin/templates/index.html
relPathPrefix = fileadmin/templates
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
DIV.id.page = 1
DIV.id.envelope = 1
UL.id.nav = 1
UL.id.footer-nav = 1
DIV.id.leadcontainer = 1
DIV.id.content-topright = 1
DIV.id.leftcol = 1
DIV.id.rightcol = 1
}
}
---------------------
tmp.templatePrincipal = TEMPLATE
tmp.templatePrincipal {
tx_rlmptmplselector.title = Principal
template < plugin.tx_automaketemplate_pi1
template.content.templateType = sub
template.content.file = fileadmin/templates/index.html
workOnSubpart = envelope
# tmp.lead is defined elsewhere and works properly
subparts.leadcontainer < tmp.lead
subparts.leftcol < styles.content.getLeft
subparts.rightcol < styles.content.getRight
subparts.content-topright < styles.content.get
}
tmp.templatePage1 = TEMPLATE
tmp.templatePage1 {
tx_rlmptmplselector.title = Pagina 1
template < plugin.tx_automaketemplate_pi1
template.content.templateType = sub
template.content.file = fileadmin/templates/sub/page1.html
workOnSubpart = envelope
subparts.pagecontent < styles.content.get
}
tmp.templateDefaultPage = TEMPLATE
tmp.templateDefaultPage {
tx_rlmptmplselector.title = Default Page
template < plugin.tx_automaketemplate_pi1
template.content.file = fileadmin/templates/index.html
template.content.templateType = main
workOnSubpart = DOCUMENT_BODY
# tmp.nav is defined elsewhere and works properly
subparts.nav < tmp.nav
}
rlmptmplselector TS
---------------------
plugin.tx_rlmptmplselector_pi1 {
// Define the paths leading to our HTML template files
templatePathMain = fileadmin/templates/
templatePathSub = fileadmin/templates/sub/
// Define the filenames used as the default HTML templates
defaultTemplateFileNameMain = index.html
defaultTemplateFileNameSub = generica.html
// If there is a page having no template selected, use a template
// selected earlier in the rootline. If there is none, use the default
inheritMainTemplates = 1
inheritSubTemplates = 1
templateObjects.sub {
10 < tmp.templatePrincipal
20 < tmp.templatePage1
}
templateObjects.main {
10 < tmp.templateDefaultPage
}
}
tmp.templateGeral = TEMPLATE
tmp.templateGeral {
template < plugin.tx_automaketemplate_pi1
template.content.file =< plugin.tx_rlmptmplselector_pi1
subparts.envelope.templateType = main
workOnSubpart = DOCUMENT_BODY
subparts.nav < tmp.nav
subparts.envelope =< plugin.tx_rlmptmplselector_pi1
subparts.envelope.templateType = sub
}
---------------------
Main setup TS
---------------------
page = PAGE
page.10 = TEMPLATE
page.10 < temp.templateGeral
---------------------
Main page HTML
---------------------
<body id="home">
<div id="page">
<ul id="nav"> ...</ul>
<div id="envelope">
<div id="content-topleft" class="left">
<div id="leadcontainer">
content here...
</div>
</div>
<div id="content-topright" class="right"> </div>
<div class="clear"> </div>
<hr/>
<div id="content-bottom">
<div id="leftcol">
content here...
</div>
<div id="rightcol">
content here...
</div>
</div>
</div><!-- envelope -->
</div> <!-- page -->
<div id="footer">
content here
</div>
</body>
---------------------
Page 1 HTML
---------------------
<body>
<div id="page" class="clearfloat">
<ul id="nav">navigation...</ul>
<div id="envelope">
<div id="pagecontent">
content here...
</div><!-- pagecontent -->
</div><!-- envelope -->
</div>
</div>
<div id="footer">
content here...
</div>
</body>
---------------------
Thanks for help!
--
Luis Flávio Seelig
lflavios at gmail.com
----
Linux User #363919
More information about the TYPO3-english
mailing list