PatternSkin Navigation

Include main navigation with:
%INCLUDE{"Navigation" section="main"}%

Include sections

%STARTSECTION{"main"}%<noautolink>
<div id="patternTopBarButtons" class="clear"><ul class="sf-menu">
  %INCLUDE{"%TOPIC%" section="topbarbutton" DESTWEB="%USERSWEB%" DESTTOPIC="%HOMETOPIC%" LABEL="%JQICON{"fa-home" style="font-size:1.1em"}% %USERSWEB%"}%
  <li>[[%WIKIUSERNAME%][%JQICON{"fa-user"}% %MAKETEXT{"My Profile"}%]]</li>
  %IF{"istopic '%USERSWEB%.%WIKINAME%LeftBar'"
    then="<li>[[%USERSWEB%.%WIKINAME%LeftBar][%JQICON{"fa-bookmark"}% %MAKETEXT{"My Links"}%]]$n$percntINCLUDE{\"%USERSWEB%.%WIKINAME%LeftBar\"}$percnt</li>"
  }%%IF{"istopic '%USERSWEB%.%WIKIUSERSTOPIC%'"
    then="<li>[[%USERSWEB%.%WIKIUSERSTOPIC%][%JQICON{"fa-users"}% Users]]</li>"
  }%%IF{"'%BASEWEB%'!='%USERSWEB%'"
    then="<li>
        <a href='%SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC%' class='active'>%JQICON{"fa-thumb-tack"}% %BASEWEB%</a>
        $percntINCLUDE{\"%TOPIC%\" section=\"webtools\"}$percnt
      </li>"
  }%<li><a>%JQICON{"fa-cloud"}% Webs</a>%INCLUDE{"%TOPIC%" section="webs"}%</li>
</ul></div>
%JQREQUIRE{"superfish"}%%ADDTOZONE{
  "script" 
  id="PATTERNMENU" 
  topic="%WEB%.%TOPIC%" 
  section="js" 
  requires="JQUERYPLUGIN::SUPERFISH"
}%%ADDTOZONE{"head" 
   id="SUPERFISH::CSS" 
   text="<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/plugins/superfish/jquery.superfish.css' type='text/css'/>"
}%</noautolink>%ENDSECTION{"main"}%

%STARTSECTION{"webs"}%<ul>
%FORMAT{
  "%CALCULATE{"$LISTUNIQUE($SUBSTITUTE(%WEBLIST{
    webs="%USERSWEB%,public"
    format="$name"
    separator="; "
  }%, (/.*?)?;, $comma , , r))"}%"
  type="string"
  format="$percntINCLUDE{
      \"%TOPIC%\"
      section=\"topbarbutton\"
      ID=\"\" 
      DESTWEB=\"$item\" 
      DESTTOPIC=\"%HOMETOPIC%\" 
      LABEL=\"$item\"
    }$percnt"
}%
</ul>%ENDSECTION{"webs"}%

%STARTSECTION{"webtools"}%<ul>
  <li>[[%BASEWEB%.WebTopicList][%MAKETEXT{"Index"}%]]</li>
  <li>[[%BASEWEB%.WebSearch][%MAKETEXT{"Search"}%]]</li>
  <li>[[%BASEWEB%.WebChanges][%MAKETEXT{"Changes"}%]]</li>
  <li>[[%BASEWEB%.WebNotify][%MAKETEXT{"Notifications"}%]]</li>
  <li>[[%BASEWEB%.WebStatistics][%MAKETEXT{"Statistics"}%]]</li>
  <li>[[%BASEWEB%.WebPreferences][%MAKETEXT{"Preferences"}%]]</li>
</ul>%ENDSECTION{"webtools"}%

%STARTSECTION{"topbarbutton"}%<li%IF{
    "'$ID' and '%ID%'!=''"
    then=" id=\"%ID%\""
}%><a href="%SCRIPTURL{"view"}%/%DESTWEB%/%DESTTOPIC%" class="%IF{
    "'%DESTWEB%'='%BASEWEB%'"
    then="active"
    else="inactive"
}%">%LABEL%</a></li>%ENDSECTION{"topbarbutton"}%

%STARTSECTION{"js"}%<script>
jQuery(function($) {
  $("#patternTopBarButtons > ul").superfish({
    dropShadows: false, 
    cssArrows: false,
    speed:200
  })
});
</script>%ENDSECTION{"js"}%

!-- %JQREQUIRE{"chili"}% -->
Topic revision: r1 - 22 January 2017, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback