[TYPO3-english] Change Text "login" to "logout " on TMENU

JoH asenau info at cybercraft.de
Wed Feb 19 08:03:23 CET 2014


Am 18.02.2014 13:02, schrieb Ipan:
> Hi,
>
>
> thanks for the reply. It seems both solution from Sergey and thomas are
> valid.
> But is there simple solution as in Javascript like:
>
>
> document.getElementById("login").innerHTML = "logout";
> (assumeing the login label has id=login)
>
>
> or something like that

You can make use of the nav_title to hold the "Logout" value (or any 
other field of the pages table, that you don't use for other purposes). 
Maybe it could be one of the field that will be available in the 
language overlay as well, so you could even translate it.

Then you can use a condition  like this:

  page.10.marks.MN = HMENU
  page.10.marks.MN {
     special = directory
     special.value = {$idMain}
     entryLevel = 2
     1 = TMENU
     1.NO = 1
     1.wrap = <ul>|</ul>
     1.NO.wrapItemAndSub = <li><span>|</span></li>
     1.ACT < .1.NO
     1.ACT.ATagParams = class='aktiv'
     2 < .1
     3 < .1
  }

[loginUser = *]
page.10.marks.MN {
   1.NO.stdWrap.field = nav_title // title
   1.ACT.stdWrap.field = nav_title // title
   2 < .1
   3 < .1
}
[global]

This way you make sure that any other page, which hasn't got a nav_title 
still shows the default field, which is the title.

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