[TYPO3] modern template building 2 - problems
tapio
tapio.markula at dnainternet.net
Wed Mar 8 09:53:25 CET 2006
> I started to read MTB2+3 tutorial in order to figure out how to set and
> work with multiple templates. I'm having some troubles at start of the
> tutorial. On pages 15 to 17 there are instructions on how to change
> files named ext_tables.php and
> class.tx_tmplselect_pages_tx_tmplselect_main_tmpl.php in order to get a
> selection box for the main and content area templates.
> After I've changed these files I can't log into the dummy package
> anymore. I've been getting this message:
>
> Parse error: parse error, unexpected T_REQUIRE_ONCE in
> /var/www/dummy-3.8.1/typo3conf/ext/tmplselect/class.tx_tmplselect_addfilestosel.php
> on line 33
You have just made yourself a syntax error. If Typo3 has a serious
syntax error you can't log. You must manually edit localconf.php and
remove the extension, which created the error from the list
$TYPO3_CONF_VARS['EXT']['extList']
and delete manually TEMP-files from typo3conf folder
I recommend *not* to follow these instructions. Install instead of the
own made tmplselect the plugin 'rlmp_tmplselector'
It is ready made extension, which does the same task.
made following changes to Auto parser plugin
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
#content.file = fileadmin/template/main/{$defaultTemplateFileName}
#instead of content < plugin.tx_tmplselect_pi1
content < plugin.tx_rlmptmplselector_pi1
...
}
#add this to the end of the file
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
}
Simple it is *not* worth to create own plugin for that.
The plugin 'stfl_tmpl2columns' works with rlmp_tmplselector and it is
useful to get BE columns match with FE columns.
More information about the TYPO3-english
mailing list