How to display second level and third level menu with title as parent menu.


Typo script for display sub menu of current page with header of parent menu.

In this typo script we have to merge two different object in one section.

For that we have to use “COA

Following script should do the trick.

lib.leftMenu = COA
lib.leftMenu {

    10 = TEXT
    10 {
        data = leveltitle:-2
        wrap = 

|

} 20 = HMENU 20 { entryLevel = 1 wrap = <ul>|</ul> 1 = TMENU 1 { target = _self NO { wrapItemAndSub = <li>|</li> ATagTitle.field = subtitle // title stdWrap.htmlSpecialChars = 1 } ACT = 1 ACT{ wrapItemAndSub = <li class="active">|</li> | </li> ATagTitle.field = subtitle // title stdWrap.htmlSpecialChars = 1 ATagParams = class="active" } } 2 < .1 2{ wrap = <ul class="subSsubNavigation">|</ul> } } }

Note :

leveltitle:-2 
This will help you to display parent page title.

I hope this will work for you and this typosctipt will help for merge more than two typosctipt / object.

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

htmlSpecialChars in TYPO3


#for common text

page.10.stdWrap.htmlSpecialChars=1

# for headers

lib.stdheader.10.setCurrent.htmlSpecialChars = 1

if you have set htmlSpecialChars in menu then you can add below line in your menu TS

lib.mainMenu.1.NO.stdWrap.htmlSpecialChars = 1

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to add HTML element inside of link tag in typoscript


   

How to add span tag inside of link tag in typoscript
OR
How to add span tag between link of menu in typoscript

stdWrap.wrap = <span>|</span>

Typoscript for menu

lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0
lib.mainMenu.wrap = <ul>|</ul>
lib.mainMenu.1 = TMENU>
lib.mainMenu.1.NO {
    allWrap = <li>|</li>
    stdWrap.wrap = <span>|</span>
}

OUT PUT is like

<ul>
    <li><a href="..."><span>Menu 1</span></a></li>
    <li><a href="..."><span>Menu 2</span></a></li>
    <li><a href="..."><span>Menu 3</span></a></li>
</ul>

Typo3 – Language Menu – Only Show the inactive language


lib.languageMenu = HMENU
lib.languageMenu {
    special = language
    special.value = 1
    wrap = <div class="lang">|</div>

    1 = TMENU
    1 {
        NO = 1
        NO.stdWrap.cObject = TEXT
        NO.stdWrap.cObject.value = I NORKSIN
        NO.ATagParams = class="no"
    }
}

[globalVar = GP:L = 1]
temp.lang {
    special.value = 0
    1 {
        NO.stdWrap.cObject.value = IN ENGLISH
        NO.ATagParams = class="en"
    }
}
[global]

If you have any query then feel free to contact me at Jainish Senjaliya

Language menu via TypoScript


lib.languageMenu = HMENU
lib.languageMenu{
 special = language
 special.value = 0,1,2,3
 special.normalWhenNoLanguage = 0
 wrap =<ul> | </ul>
 1 = TMENU
 1
 {
   wrap = <div><h1>Language</h1></div><ul>|</ul>
   NO = 1
   NO
   {
    linkWrap = <li class="first"> | </li> |*| <li> | </li> 
                     |*| <li class="last"> | </li>
    stdWrap.override = HI || DE || EN || RU
    ATagTitle = Indian || German || English || Russia
    doNotLinkIt = 1
    stdWrap.typolink.parameter.data = page:uid
    stdWrap.typolink.additionalParams = &L=0 || &L=1 || &L=2 || &L=3
    stdWrap.typolink.addQueryString = 1
    stdWrap.typolink.addQueryString.exclude = id,cHash,no_cache
    stdWrap.typolink.addQueryString.method = GET
    stdWrap.typolink.useCacheHash = 0
    stdWrap.typolink.no_cache = 0
   }
   ACT = 1
   ACT < .NO
   ACT.ATagParams = class = "active"
   ACT.doNotLinkIt = 1
   ACT.linkWrap = <li class="first active"> | </li> |*|
    <li class="active"> | </li> |*| <li class="last active"> | </li>
 }
}

If you have any query then feel free to contact me at Jainish Senjaliya

Different icon besides menu item from imgresource using typoscript


temp.navigation = COA
temp.navigation {
      10 = HMENU
      10.entryLevel = 1
      10.1 = TMENU
      10.1 {
          noBlur = 1
          ACT = 1
      }

      wrap = <ul>|</ul>
      10.1.NO {
          allWrap = <li> | </li>
          stdWrap.cObject = COA
          stdWrap.cObject {
              10 = IMAGE
              10.file.import = uploads/media/
              10.file.import.field = media
              10.file.import.listNum = 0
              20 = TEXT
              20.field = title
          }
      }

      10.1.ACT {
          allWrap = <li>|</li>|*|<li>|</li>|*|<li class=”last”>|</li>
          expAll = 1
          ATagParams = class=”active”
          stdWrap.cObject = COA
          stdWrap.cObject {
              10 = IMAGE
              10.file.import = uploads/media/
              10.file.import.field = media
              10.file.import.listNum = 0
              20 = TEXT
              20.field = title
          }
      }
}

If you have any query then feel free to contact me at Jainish Senjaliya