[TYPO3] make "Home" link

Fearless Goblin (Victor Livakovsky) v-tyok at mail.ru
Wed Sep 17 20:49:59 CEST 2008


> Hi!

> I want to make "Home" link on every page. This link must be on site head
> (except main page!):

> lib.head = COA
> lib.head.10 = TEXT
> lib.head.10{
>     value (
>     <img src="dat/img/sys/ban.jpg"/>
>     <h1><a name="pagetop" id="pagetop"><span>Site name.</span></a></h1>
>     )
>     insertData = 1
> }

> but there must be no link on main page (id=14). I think it can be done with
> conditions like:

> lib.head = COA
> lib.head.10 = TEXT
> lib.head.10{
>     value (
> [PIDinRootline = 14]
>     <img src="dat/img/sys/ban.jpg"/>
>     <h1><a name="pagetop" id="pagetop"><span>Site name.</span></a></h1>
> [else]
>     #
> [end]
>     )
>     insertData = 1
> }

> but how made them work inside {( ...)}? And what must i use for link
> generartion? Smth like baseURL?


Hm... Why you don't want to make it in such way:


lib.head.10 = HTML
lib.head.10.value (
     <img src="dat/img/sys/ban.jpg"/>
     <h1><a href="http:/www.yoursite.name/" name="pagetop" id="pagetop"><span>Site name.</span></a></h1>
)
[globalVar = TSFE:id = 14]
lib.head.10.value =
[global]

I cann't understand why do you want generate link, if your "Home" page
will always have the same URL?

And another thing: PIDinRootline condition will work on every page,
that has provided id in rootline. That means, that every child of
"Home" page still will have no "Home" link. That's why you should use
globalVar = TSFE:id = 14.





More information about the TYPO3-english mailing list