[TYPO3-english] Tricky TypoScript question concerning stdWrap and conditions

Jörg Klein joerg at klein-family.com
Thu Jun 16 13:39:04 CEST 2011


Hi guys,

I have a tricky TypoScript problem for which I do not know a solution.

I output a text. This text should generally be wrapped in a link tag.
The link should point to the page in the rootline, which is on level 1.

But I do not want to have a link to the page itself, when I am on it.
So if I am on a page on level 1, the text should not be linked.
(All that works with the TypoScript below.)

Now comes the problem:
The text also should not be linked, if the page on level 1 is a shortcut to
a subpage and if you currently are on that subpage
(= on the target page of that shortcut).
I do not know how to do that.

Do you have an idea?
Is that possible?

Cheers

Jörg

Here is my TypoScript setup:

5 = TEXT
5 {
  value = Lorem ipsum
  # Link it
  typolink.parameter {
    # Link target is the page on level 1 in the page tree
    data = leveluid : 1

    # Only put the link, when we are not on level 1 currently
    if {
      # Set uid of the current page as comparison value
      value.data = field : uid
      # It should equal the uid of the page in the rootline on level 1
      equals.data = leveluid : 1
      # In that case I do NOT want a link. So negate what we have, to get 
the
      link in the other cases
      negate = 1
      # Result: The link is there, if the current page is not the same as 
the
      one on level 1 in the rootline
    }
  }
}

Again the problem:
How can I additionally hide the link, if
- the page on level 1 is a shortcut to a subpage and
- I currently am on that subpage?
 




More information about the TYPO3-english mailing list