You are here: Main » SiteMenu

SiteMenu

2017-01-18 - 22:28 | Version 7 |

Definition of site wide horizontal menu

Implementation

%STARTINCLUDE%<ul>
  <li>[[Home.%HOMETOPIC%][%MAKETEXT{"Home"}%]]</li>%IF{"$'WIKINAME'!='WikiGuest'" 
  then="$percntINCLUDE{\"Main.SiteMenu\" section=\"usermenu\"}$percnt"
}%</ul>%STOPINCLUDE% 

User Menu

%STARTSECTION{"usermenu"}%%IF{"'%USERNAME%' ingroup 'EmployeeGroup'" 
  then="<li>[[TimeClock.%HOMETOPIC%][Time Clock]]</li>"
}%%IF{"'%USERNAME%' ingroup '906EmployeeGroup'" 
  then="<li>[[EManual906.%HOMETOPIC%][906 <nop>EManual]]</li>"
}%%IF{"'%USERNAME%' ingroup 'HrGroup'" 
  then="<li>[[Payroll.%HOMETOPIC%][Payroll]]</li>"
}%%IF{"'%USERNAME%' ingroup 'AdminGroup' or '%USERNAME%' ingroup 'ItGroup'" 
  then="$percntINCLUDE{\"Main.SiteMenu\" section=\"adminmenu\"}$percnt"
}%%INCLUDE{"Main.SiteMenu" section="helpmenu"}%
%ENDSECTION{"usermenu"}%

Help menu

%STARTSECTION{"helpmenu"}%<li >[[%SYSTEMWEB%.WebHome][%MAKETEXT{"Help"}%]]
  <ul>
    <li>[[%SYSTEMWEB%.ResetPassword][%JQICON{"key"}% %MAKETEXT{"Password forgotten"}%]]</li>
%IF{"'%USERNAME%' ingroup 'StaffGroup' or '%USERNAME%' ingroup 'AdminGroup'" 
  then="$percntINCLUDE{\"Main.SiteMenu\" section=\"adminhelpmenu\"}$percnt"
}%
</ul>
</li>%ENDSECTION{"helpmenu"}%

Admin Help menu

%STARTSECTION{"adminhelpmenu"}%<li><hr /></li>
    <li>[[Sandbox.%HOMETOPIC%][%JQICON{"briefcase"}% %MAKETEXT{"Sandbox"}%]]</li>
    <li>[[%SYSTEMWEB%.WebHome][%JQICON{"book_open"}% %MAKETEXT{"Documentation"}%]]<ul>
       <li>[[%SYSTEMWEB%.Macros][Macros]]</li>
       <li>[[%SYSTEMWEB%.IfStatements][If Statements]]</li>
       <li>[[%SYSTEMWEB%.DataForms][DataForms]]</li>
       </ul></li>
    <li >[[%SYSTEMWEB%.InstalledPlugins][%JQICON{"plugin"}% %MAKETEXT{"Installed plugins"}%]] 
        <ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=plugins;icon=application'}"></ul>
    </li>
%ENDSECTION{"adminhelpmenu"}%

Plugins/Contribs Submenu

%STARTSECTION{"plugins"}%%FORMATLIST{"%ACTIVATEDPLUGINS%" 
       split=", "
       pattern="(.*?)\.(.*)"
       format="<li>[[$1.$2][$2]]</li>"
       separator=" $n"
    }%
    <li> __Contribs__ </li>
    %SEARCH{"name ~ '*Contrib' OR name ~ '*AddOn'"
       type="query"
       web="System"
       nonoise="on"
       format="<li>[[$web.$topic][$topic]]</li>"
       separator=" $n"
    }%</ul>
%ENDSECTION{"plugins"}%

Admin menu

%STARTSECTION{"adminmenu"}%<noautolink>
<li><a href='#' onclick='return false;'>%MAKETEXT{"Admin"}%</a><ul>
     <li><a href='#' onclick='return false;'>%JQICON{"cog"}% Web Tools</a> <ul>
       <li>[[%BASEWEB%.WebSearch][%ICON{searchtopic}% Search]]</li> 
       <li>[[%BASEWEB%.WebChanges][%ICON{changes}% Changes]]</li> 
       <li>[[%BASEWEB%.WebTopicList][%ICON{index}% Index]]</li> 
       <li>[[%BASEWEB%.WebNotify][%ICON{notify}% Notifications]]</li> 
       <li>[[%BASEWEB%.WebRss][%ICON{rss}% RSS]]</li>%IF{"istopic '%BASEWEB%.WebStatistics'" then="<li>[[$percntBASEWEB$percnt.WebStatistics][$percntICON{statistics}$percnt Statistics]]</li>"}% 
    </ul></li> 
    <li><a href='#' onclick='return false;'>%JQICON{"application_cascade"}% Web List</a><ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=webs'}" style='width:12em;'></ul></li>
    <li>
         [[Applications.%HOMETOPIC%][%JQICON{"application_double"}% %MAKETEXT{"Applications"}%]]
         <ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/%SYSTEMWEB%/SiteMenu?skin=text;section=subwebs;theweb=Applications;icon=application%IF{"defined EXCLUDEWIKIAPPS" then=";excludeweb=%EXCLUDEWIKIAPPS%"}%'}"></ul></li>
    <li>[[%USERSWEB%.WikiUsers][%JQICON{"user"}% %MAKETEXT{"Users"}%]]</li> 
    <li>[[%USERSWEB%.WikiGroups][%JQICON{"group"}% %MAKETEXT{"Groups"}%]]</li> 
    <li>[[%BASEWEB%.%WEBPREFSTOPIC%][%JQICON{"wrench"}% %MAKETEXT{"Web preferences"}%]]</li>
    <li>[[%LOCALSITEPREFS%][%JQICON{"wrench_orange"}% %MAKETEXT{"Site preferences"}%]]</li>
    <li>[[%USERSWEB%.SiteSkin][%JQICON{"eye"}% Site Skin]]</li>
    <li>[[%SYSTEMWEB%.SitePermissions][%JQICON{"key"}% %MAKETEXT{"Site permissions"}%]]</li>
    %IF{"context ActivityStreamPluginEnabled" 
      then="<li>[[%SYSTEMWEB%.SiteActivityStream][%JQICON{"user"}% %MAKETEXT{"Site activities"}%]]</li>"
    }%<!-- -->
    <li>[[%SCRIPTURLPATH{"configure"}%][%JQICON{"wand"}% %MAKETEXT{"Configure Foswiki"}%]]</li>
    <li> <hr /> </li>
    <li>[[%SYSTEMWEB%.WebCreateNewWeb][%JQICON{"folder_add"}% %MAKETEXT{"Create a new web"}%]]</li>
    <li>[[%SCRIPTURL{"rename"}%/%BASEWEB%/%BASETOPIC%?action=renameweb][%JQICON{"folder_go"}% %MAKETEXT{"Rename current web"}%]]</li>
  </ul>
</li>
</noautolink>%ENDSECTION{"adminmenu"}%

Web List

%STARTSECTION{"webs"}%
  <li>[[%SYSTEMWEB%.SiteMap][%ICON{sitemap}% Site Map]]</li>
%FLEXWEBLIST{
  webs="public"
  subwebs="none"
  adminwebs="Applications|TWiki|Trash"
  format="<li><b><a href='$percntSCRIPTURL{view}$percnt/$web/%HOMETOPIC%' title='$sitemapwhat'>$name</a></b></li>"
  separator=" $n"
}%
%ENDSECTION{"webs"}%

Subwebs

%STARTSECTION{"subwebs"}%%FLEXWEBLIST{
  include="%URLPARAM{"theweb" default="%theweb%"}%.*"
  exclude="%URLPARAM{"theweb" default="%theweb%"}%|.*(%URLPARAM{"excludeweb" default="does not exist"}%).*"
  header="<li>"
  subheader="<ul><li>"
  format="[[$web.%HOMETOPIC%][%JQICON{
    "%URLPARAM{"icon" 
       default="%IF{"defined icon" then="%icon%" else="bullet_white"}%"
    }%"}% $name]]"
  separator="</li><li>"
  subfooter="</li></ul>"  
  footer="</li>"
}%%ENDSECTION{"subwebs"}%
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding 906 Improvements Wiki? Send feedback