Dynamic Navigation

From Organic Design
Revision as of 01:53, 19 June 2008 by Nad (talk | contribs)

Show/Hide Boxes

This method is from [Page|Wiki News front page], it involves three parts, CSS styles, JavaScript code and a template, which follow here:




Language Preference

I've made this quick extension, ExtraMagic, which will add some useful magic words including the current users name, language pref and skin pref. They are accessed with the following magic words:

{{CURRENTUSER}}
{{CURRENTLANG}}
{{CURRENTSKIN}}

If you also install ParserFunctions then you can then do conditional content based on lang pref, for example:

<div class="{{#ifeq:{{CURRENTLANG}}|en|english-example|other-langs}}">

which would give the following for english users

<div class="english-example">

or this for everyone else

<div class="other-langs">