Issue Feature Closed

#41337TSref/MENUITEM ACTUSR, ACTUSRRO, CURUSR, CURUSRRO

Philipp Müller 09/25/12, 08:54 updated 03/08/20, 22:25

Description

Hello

It would be very usefull, if we have the possibility to use the TSref/MENUITEM ACTUSR, ACTUSRRO, CURUSR and CURUSRRO.

For example:

lib.field_nav = HMENU
lib.field_nav {
  entryLevel = 0

  1 = TMENU
  1 {
    noBlur = 1

    // Normal
    NO = 1
    NO {
      ATagParams.field = title
      ATagParams.wrap = title="|"

      ATagBeforeWrap = 1
      linkWrap = <span>|</span>

      wrapItemAndSub = <li class="first no"> | </li> |*| <li class="no"> | </li> |*| <li class="last no"> | </li>
    }

    // Access restricted
    USR < .NO
    USR.wrapItemAndSub = <li class="first usr"> | </li> |*| <li class="usr"> | </li> |*| <li class="last usr"> | </li>

    // If has subpages
    IFSUB < .NO
    IFSUB.wrapItemAndSub = <li class="first sub"> | </li> |*| <li class="sub"> | </li> |*| <li class="last sub"> | </li>

    // Active
    ACT < .NO
    ACT.ATagParams.wrap = class="act" title="|"
    
// Active and access restricted
ACTUSR < .ACT
ACTUSR.wrapItemAndSub = <li class=“first usr”> | </li> |*| <li class=“usr”> | </li> |*| <li class=“last usr”> | </li>
</pre>*<pre>
// Active and if has subpages
ACTIFSUB < .ACT
ACTIFSUB.wrapItemAndSub = <li class=“first sub”> | </li> |*| <li class=“sub”> | </li> |*| <li class=“last sub”> | </li>
  // Space
SPC = 1
SPC.doNotShowLink = 1
SPC.doNotLinkIt = 1
SPC.allWrap = <li class=“space”><!— nav-space| —></li>
  wrap = <ul class=“level0”> | </ul>
}
2 < .1
2.wrap = <ul class=“level1”> | </ul>
3 < .2
3.wrap = <ul class=“level2”> | </ul>
4 < .3
4.wrap = <ul class=“level3”> | </ul>
}
</pre>

Regards Philipp

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 7

  1. Mathias Schreiber changed target version 01/16/15, 16:50

  2. Benni Mack changed target version 06/15/15, 17:44

  3. Susanne Moog changed target version 08/05/15, 10:27

  4. Benni Mack changed target version 09/24/15, 08:38

  5. Riccardo De Contardi changed target version 02/23/17, 14:49

  6. Susanne Moog changed target version 01/28/18, 14:29

  7. Benni Mack commented and changed status New Closed 03/08/20, 22:25

    As USR could be anything, this isn’t really doable from the current point of view. I recommend to use a custom menu (see https://github.com/b13/menus) to build you own logic instead. Will close this now. If you feel otherwise, feel free to contact me, and I will reopen the issue, so we can provide more insights.