[TYPO3] how to substitute a template.file in an extension template?
Katja Lampela
katja.lampela at lieska.net
Fri Oct 26 15:59:34 CEST 2007
Hi Tomasz,
Did you try it without the
page.10 < temp.mainTemplate
If your main template is in the root page, I don't think you have to
define this kind of thing in the ext templates. (don't know what this
temp.mainTemplate is though)
So, you have to substitute only the parts you want to in the ext
template (for example the htm template file).
- Katja
Tomasz Chmielewski kirjoitti:
> I have a template which is used for all pages. For some of the pages,
> I would like to use a different template file.
>
> Instead of copying the whole template, it is better to use an
> extension template for small changes.
> After some testing, I realized that an extension template has to look
> like below:
>
> ### Extension template - start
>
> # New template file
> temp.mainTemplate.template.file = fileadmin/templates/newfile.htm
>
> # Copying the content from TEMPLATE for <body>-section:
> page.10 < temp.mainTemplate
>
> ### Extension template - end
>
>
> Indeed, the page gets look&feel defined in "newfile.htm", but
> unfortunately, all "###marks###" are gone. For example, in the main
> template I substituted ###SEARCH### marks with a search form:
>
> ### Search - Start
> page.10.marks.SEARCH < tt_content.search.30
> page.10.marks.SEARCH.dataArray >
> (...)
>
>
> On a page with an extension template, there is no search form, but
> ###SEARCH### visible to the end user.
>
> This means that my method of substituting a template.file in an
> extension file is wrong. What is the correct way to do it?
>
>
More information about the TYPO3-english
mailing list