[TYPO3-english] Hilighting restricted pages in HMENU/TMENU

Alban Cousinie junk at mind2machine.com
Wed May 15 16:24:12 CEST 2013


Hello everybody,

As you know, when a frontend user is authenticated in Typo3, the restricted pages will show up in the TMENU. If he is not authenticated, those will be masked.

Now I would like to experiment a different behavior : the restricted page would have different css style in the menu so the user can see very quickly these are restricted pages. Also they would appear with no lonk for unauthenticated users, so they know that they will have access to more information when they become members of the website.

Does anyone have a clue of how to implement this ? I don't see any TS instruction for processing separatly pages based on their properties in the TMENU reference. At least I would like to add a class="members" attribute to menu entries of restricted access pages.

Here is my navigation code so far :

lib.field_navigation = HMENU
lib.field_navigation.special = directory
lib.field_navigation.special.value = 1
lib.field_navigation.1 = TMENU
lib.field_navigation.1.wrap = <ul id=mainNavUL>|</ul>
lib.field_navigation.1 {
  expAll=1
  NO {
  	  allWrap=<li>|
  	  #ATagParams = href="javascript:return false;" class="navLevel2Rest"
  	  ATagBeforeWrap=1;
  }
  ACT = 1  
  ACT {
  	  allWrap=<li>|
  	  #ATagParams = href="javascript:return false;" class="navLevel2Rest current"
  	  ATagBeforeWrap=1;
  }
}
lib.field_navigation.2 = TMENU
lib.field_navigation.2 {
   
  expAll=1
  wrap=<ul>|</ul></li>
  NO {
	  allWrap=<li>|
  	  ATagBeforeWrap=1;
  }  
}

lib.field_navigation.3 = TMENU
lib.field_navigation.3 {
   
  expAll=1
  wrap=<ul>|</ul></li>
  NO {
	  allWrap=<li>|</li>
  	  ATagBeforeWrap=1;
  }  
}

Thanks


More information about the TYPO3-english mailing list