[TYPO3] make "Home" link

Ronald Steiner Ronald.Steiner at googlemail.com
Wed Sep 17 23:15:25 CEST 2008


Hi,

in TypoScript one line over wirtes what ever has been defined before.

greetings

Ron


maaboo schrieb:
> Thanks, i did it with include link http://mysite into [globalVar = TSFE:id =
> 14] condition, but i still have question about variable instead of string
> like "http://mysite". I can insert year into my page with {date:Y} but why i
> can't use smth like this for home site url?
> 
> And one more question... Why contition works only if written after all but
> doesn't work if i write it before all:
> lib.head.10 = HTML
> [globalVar = TSFE:id = 14]
> lib.head.10.value ...
> [global]
> lib.head.10.value ...
> 
> ?
> 
> 2008/9/17 Fearless Goblin (Victor Livakovsky) <v-tyok at mail.ru>
> 
>>> 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