[TYPO3] mastertemplate

JoH asenau info at cybercraft.de
Sun Jul 8 15:28:15 CEST 2007

> as this is exactly my problem, I will hook in right here in this
> thread. So as you said, the following quoted principle should give
> perfect results, it seems as I must have got something really wrong
> here...
> 2007/7/8, JoH asenau <info at cybercraft.de>:
>> Root    => Content of the startpage
>>     Page1    => Shortcut to Root
>> Will give the user only one page, since Page1 always redirects to
>> Root whitout using any id.
> So as I think that I have exactly the second version implemented in
> all of my sites, every site still hast two pages with the same
> content, as there is the root of the domain and the directory
> (realurl) /startseite (this would be startpage or homepage).
> My rootpage has ID 239 and ID 240 is a shortcut to pageID 239, named
> "Startseite".
> If somebody wants to have a look you can - at www.zuckerfotos.de.

You are using RealURL and this makes the difference in this case.

The default behaviour would give you a link named "Startseite" pointing
directly to www.domain.tld, while realURL adds the path "startseite".

So you have to
a) edit your realURL settings to remove this path, if it's "startseite" or
b) completely remove the page "startseite" and simply add an additional link
in front of your menu using TS

I prefer option b) and this is some TS that will give you exactly the
desired result.
It will even recognize if the rootpage is the current page or not:

lib.topmenu = HMENU
lib.topmenu {
  stdWrap.outerWrap = <ul>|</ul>
  stdWrap.prepend = COA
  stdWrap.prepend {
    10 = TEXT
    10 {
      value = Home
      typolink.parameter.dataWrap = {getIndpEnv:HTTP_HOST} - active
      wrap = <li class="items">|</li>
      if.value = 1
      if.equals.data = TSFE:id
    20 = TEXT
    20 {
      value = Home
      typolink.parameter.dataWrap = {getIndpEnv:HTTP_HOST} -
      wrap = <li class="items">|</li>
      if.value = 1
      if.equals.data = TSFE:id
      if.negate = 1
  entryLevel = 0
  excludeUidList = 10
  1 = TMENU
    ... blah

This part does the trick:
{getIndpEnv:HTTP_HOST} - active

It's split up into 3 subparts, where the first will create the link, the
second is "-" which means no target should be set and third one will create
For the second element, the class is removed and both elements are switched
using "if".



Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com

More information about the TYPO3-english mailing list