[TYPO3-english] Home page url

Jan Bednarik info at bednarik.org
Mon Feb 13 20:35:02 CET 2012


Hi,

I use shortcut from "Home" to root all the time.

> For ease of administration I've opted to shortcut Home to the root page
> and using the following to do use a different HTML template on the home page.
>
> # Home Page Only
> [globalVar = TSFE:id = 1]
> page.20 {
>    template.file = fileadmin/domain.org/home.tmpl
> }
> [end]

You don't need to do this way. Just create another template and use it 
as template on next level (I'm not sure about the exact name of this 
field).

What it means - have your setup in a root template with

page.20 {
     template.file = fileadmin/domain.org/home.tmpl
}

and then into the next template, which will be used for subpages place 
only this:

page.20 {
    template.file = fileadmin/domain.org/content-subpages-whatever.tmpl
}

There's another thing that's sort of a problem. You may want to have 
"Home" link in your rootpage highlighted as if it was active. I do it 
this way:

root template:

# add class active to the first item of the menu
lib.menu.1.NO.ATagParams = class="active" ||

subpages template:
lib.menu.1.NO.ATagParams >

Maybe there's a better way, e.g. using "alwaysActivePid" in the root 
template. But so far, I'm okay with this one.

Regards

Jan



More information about the TYPO3-english mailing list