0
votes

i've configured typo3 to enable a multi-line navigation title. So if there is a linebreak there should be also a linebreak in the menu-link.

I'm splitting the Text with the following code

30 = COA
30.10 = TEXT
30.10 {
    field = {nav_title//title}
    listNum = 0
    listNum.splitChar = 13
}
30.20 < .30.10
30.20.listNum = 1
30.20.wrap = <br />|
30.20.required = 1

My Menu-Creation basicily the following

1 = TMENU
1.expAll = 1
1.NO {
 doNotLinkIt = 1
 stdWrap.override.cObject =TEXT
 stdWrap.override.cObject {
  typolink.parameter.field = uid
   if.isTrue.numRows {
    table = tt_content
    select {
     pidInList.field = uid
     where = colPos = 0
    }
   }
  } 
 }

The stdWrap.override-Block disables clickable links if the page if there is no content for the page.

Now to my question: It feels that i'm too dumb to merge those parts - How is it done the right way?

1
What is the effect you try to achieve? If the data shall be structured into two separate things, then use another field, like nav_title or a new one for your special purpose. If, on the other hand, your goal is just a design goal, then use CSS for that. Can you post a link to that site or maybe a screenshot of it? - Michael
If I had an nav_title with a linebreak I want to print out an <br> in the menu. i've tried to resolve it with css but it's more an academic typoscript question - jwacalex

1 Answers

1
votes

Guessing, untested:

1 = TMENU
1.expAll = 1
1.NO {
 doNotLinkIt = 1
 stdWrap.override.cObject = COA
 stdWrap.override.cObject {
    10 = TEXT
    10 {
        field = {nav_title//title}
        listNum = 0
        listNum.splitChar = 13
    }
    20 < .30.10
    20 {
        listNum = 1
        wrap = <br />|
        required = 1
    }
  typolink.parameter.field = uid
   if.isTrue.numRows {
    table = tt_content
    select {
     pidInList.field = uid
     where = colPos = 0
    }
   }
  } 
 }