[TYPO3] Problem using Template Auto-Parser Extension with Typo3, v. 4.0
Wolfgang Qual
Wolfgang.Qual at gmx.net
Thu Oct 5 17:30:27 CEST 2006
Hi list,
I am using TYPO3 4.0, and I would like to "import" a html-template via Template Auto-parser.
I followed the instructions given in the TYPO3 tutorial [1]; the template html-file was downloaded from www.oswd.org (to be more precise, I used this one [2]).
What I did
1) upload the files to fileadmin/template
2) modified the typoscript code (content.file, relPathPrefix)
The modified Typoscript:
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/index.html
# 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
TD.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/
# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY
# Substitute the ###menu_1### subpart with some example content:
subparts.menu_1 = TEXT
subparts.menu_1.value = HELLO WORLD - MENU
# Substitute the ###content### subpart with some example content:
subparts.content = TEXT
subparts.content.value = HELLO WORLD - CONTENT
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
and a snippet of the template-file
div id="avmenu">
<h2 class="hide">Menu:</h2>
<ul>
<li><a href="#">Welcome!</a></li>
<li><a href="#">Current events</a></li>
<li><a href="#">Downloads</a></li>
<li><a href="#">Art gallery</a></li>
<li><a href="#">Collections</a></li>
<li><a href="#">Litterature</a></li>
<li><a href="#">Newsletter</a></li>
</ul>
</div>
I was not able to create substitutes for the div-tags like avmenu. Also, no subpart-markers were created. Is there possibly a problem with this extension and the new version of TYPO3? Or - mistakes in the TYPOscript code?
Interestingly, subpart-markers for body and head were crated using the following example typoscript of the documenation:
# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/template_1.html
# 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
TD.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
page.config.disableAllHeaderCode=1
page.10 =< plugin.tx_automaketemplate_pi1
Any ideas, what could be wrong? I would really appreciate any comments on this issue.
Best regards,
Wolfgang
[1] http://typo3.org/documentation/document-library/tutorials/doc_tut_templselect/current/view/1/3/
[2] http://www.oswd.org/design/preview/id/2199
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the TYPO3-english
mailing list