[TYPO3] different template on 2nd level

Michel Albert Michel.Albert at statec.etat.lu
Thu Aug 24 09:16:49 CEST 2006


On Wednesday 23 August 2006 15:21, Matthew Manderson wrote:
> I achieve it this way:
>
> globe
>
> |--www (shortcut to index)
> |
>     |--home
>     |--page1
>     |--page2
>     |--page3
>     |--page4
>
> This allows me a main root template on the 'www' page for the whole site
> and a second home page only template on 'home'
>
> When people arrive at your site, they'll hit 'www' first but because it is
> now a shortcut they actually see 'home'.
>
> You can then use the template object browser on the 'home' page to
> overwrite the template settings so it displays how you want.
>
> This has the spin off advantage of allowing a Navigation with 'home' as
> your home page on the same level.
>
> If you change the alias of 'home' to 'index' then if you use simulate
> static or realurl it will show in the browser as /index.html which is more
> conventional than /home.html
>
> There are other ways but this is one of them.
>
> Try it and post back,
> Matthew
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

First of all thanks for the very quick reply. I could not respond earlier as I 
was held back with some important bugfixing ;)

And strangely, the site works today exactly the way I expect it to. I have no 
idea why there was a problem yesterday. I am sure that I cleared the cache. 
Maybe I hit a button somewhere along the way, that fixed it. If I only knew 
which one ;)

But thanks again anyway.

One thing I am still intrigued about though. I now have two copies of the main 
template and all related templates. The only change is that the second 
template does not show *one* block. Is it not possible to do that with a 
simple TS condition? I currently use two auto-parser templates which load two 
different documents. In the main template object, I identified this:

------------------------------------------------------------------------------
# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
   [...]
   subparts.sidebar-right < styles.content.getBorder
   [...]
}
------------------------------------------------------------------------------

Could I not wrap that in some sort of TS-condition, so the "sidebar-right" is 
only replaced on the root-level?

That would allow me to delete a bunch of redundant templating TS. And I would 
not need to do changes twice.

Best regards,

Mich.



More information about the TYPO3-english mailing list