[TYPO3] Extension templates
Tyler Kraft
headhunterxiii at yahoo.ca
Mon Oct 16 09:06:55 CEST 2006
Hi Joey
>> - does using an include file in my setup have pros/cons and how does
>> it effect the time it takes to generate a page?
>> (put in using <INCLUDE_TYPOSCRIPT: source="FILE:
>> fileadmin/include.txt">)
>
> Never really tried that, but it could have advantages when you want to use
> your favourite editor (i.e. with syntax highlighting for TS).
> Major drawback: You can't use the history functions of the TYPO3 BE, so it's
> almost impossible to switch back to older versions, when you did something
> wrong. Of course you can save different versions, but this will take much
> more time and is not really comfortable.
> With the history functions you can even track who has been editing the
> template and what he did.
True you do lose the history function, but I tend to put things that are
done and tested and truely working into the setup file so that they are
removed from the main template.
So for instance I'll get a complex TS menu working correctly and then
move it outside of the setup field and into an include file. That file
then seems to get cached and any change in the file requires the BE
cache to be cleared before it takes effect.
>
>> - does using conditionals ina template have pros/cons and what impact
>> it has on page generation?
>> (a conditional like [gloablVar = TSFE:id=3] )
>
> Don't know about the cons but the pros are that you can adjust your
> templates without having to struggle with stdWrap.if
>
> Usually I use a default setup inside a temp.whatever = COA. Together with
> conditions this gives me the highgest flexibility. Example:
Yes that the way I do it also, and then adjust as and where needed. Glad
to see others do it similarly.
>> - does having multiple typoscript templates have a pro/con and how
>> does it effect pages generation?
>
> Well - it makes sense to split up the whole setup into smaller chunks for
> each part of this setup. You can have temp.topmenu, temp.leftmenu,
> temp.content, temp.news, temp.whatever - each of them in it's own
> TS-template.
mmmm... interesting I've never thought of doing it like that, but I
guess that's what I'm similarly doing by including external files.
See my experience with multiple templates is that it can take a long
time to figure out where in an complicated site I need to make a change
in the typoscript for it to take the desired effect (with nested
templates and such), and I therefore found that I was just creating
multiple tempplates in order to get the job done quickly. this had the
circular effect of all of a sudden having a million templates and
constantly creating more, which made it impossible to manage. And
interestingly enough when we took over another site from a previous
developer we found the same thing had occured - template-itis.
Ty
More information about the TYPO3-english
mailing list