[TYPO3-english] help with breadcrumbs via TS

JoH asenau info at cybercraft.de
Wed Apr 21 17:18:22 CEST 2010


> First, this is the TS Setup I currently use to generate a breadcrumbs
> trail:
>
> Now, I'd like to add to each anchor a class that tells the level of
> the page, but... in reverse order! I'll explain myself better:I'd
> want to obtain something like:
>
> <a class="l4"> <a class="l3"> <a class="l2"> <a class="l1"> <strong>

You have to use a register stack that will be filled via HMENU.
Then you can use another HMENU to get the entries in reverse order.
This one is taken from a website, where we use it to generate a title-tag,
so if you want a real breadcrumb menu with links you will have to change the
10.20 part slightly:

page.headerData {
  1999 = COA
  1999 {
    5 = TEXT
    5.char = 10
    10 = COA
    10.wrap = <title>|</title>
    10.10 = HMENU
    10.10 {
      special = rootline
      special.range = 1|-1
      1 = TMENU
      1 {
        NO {
          doNotLinkIt = 1
          stdWrap.cObject = LOAD_REGISTER
          stdWrap.cObject {
            toBeReverted {
              field = nav_title
              stdWrap.htmlSpecialChars = 1
              stdWrap.case = lower
            }
          }
        }
      }
    }
    10.20 < .10.10
    10.20 {
      1.NO {
        stdWrap.cObject >
        stdWrap.cObject = COA
        stdWrap.cObject {
          10 = TEXT
          10.data = register:toBeReverted
          20 = RESTORE_REGISTER
        }
        stdWrap.noTrimWrap = |*|| | :||*| | | |
      }
    }
    10.30 = TEXT
    10.30.noTrimWrap = | : Company Name||
  }
}

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com




More information about the TYPO3-english mailing list