Log inRegister
You are here: Main » Skyloom Skin » Site Menu

Site Menu

Definition of site wide horizontal menu

Implementation

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

User Member

Basic menu items for authenticated users
%STARTSECTION{"member"}%<ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=webs'}"></ul></li>
<li class='hasSubMenu'>[[%BASEWEB%.%HOMETOPIC%][%SPACEOUT{%BASEWEB%}% Web]] <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>
%IF{"'%USERNAME%' ingroup 'AdminGroup'" 
  then="$percntINCLUDE{\"Main.SiteMenu\" section=\"adminmenu\"}$percnt"
}%<li class='hasSubMenu'>[[%SYSTEMWEB%.WebHome][%MAKETEXT{"Help"}%]]<ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=help'}"></ul></li>
%ENDSECTION{"member"}%

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'><img src='%ICONURL{blank-bg}%' alt='' width='16' height='16' border='0' style='background-color:$color' />$name web</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"}%

Help menu

%STARTSECTION{"help"}%
    <li>[[%SYSTEMWEB%.WelcomeGuest][%JQICON{"house"}% %MAKETEXT{"Welcome"}%]]</li>
    <li>[[%SYSTEMWEB%.ResetPassword][%JQICON{"key"}% %MAKETEXT{"Password forgotten"}%]]</li>
    <li>[[%SYSTEMWEB%.UserDocumentationCategory][%JQICON{"book"}% %MAKETEXT{"User Docs"}%]]<ul>
       <li>[[%SYSTEMWEB%.BeginnersStartHere][Beginners Start Here]]</li>
       <li>[[%SYSTEMWEB%.GlossaryOfTerms][Glossary of Terms]]</li>
       <li>[[%SYSTEMWEB%.GoodStyle][Good Style]]</li>
       <li>[[%SYSTEMWEB%.EditingShorthand][Basic Text Formatting]]</li>
       <li>[[%SYSTEMWEB%.Macros][Macros]]</li>
       <li>[[%SYSTEMWEB%.DocumentGraphics][Graphic Icons]]</li>
       </ul></li>
    <li>[[%SYSTEMWEB%.AdminDocumentationCategory][%JQICON{"book_key"}% %MAKETEXT{"Admin docs"}%]]<ul>
       <li>[[%SYSTEMWEB%.DataForms][DataForms]]</li>
       <li>[[%SYSTEMWEB%.InstalledPlugins][InstalledPlugins]]</li>
       <li>[[%SYSTEMWEB%.Macros][Macros]]</li>
       <li>[[%SYSTEMWEB%.IfStatements][If Statements]]</li>
       </ul></li>
    <li>[[%SYSTEMWEB%.DeveloperDocumentationCategory][%JQICON{"book_edit"}% %MAKETEXT{"Developer docs"}%]]</li>
    <li>[[%SYSTEMWEB%.ReferenceManual][%JQICON{"book_open"}% %MAKETEXT{"Reference manual"}%]]</li>
    <li class="hasSubMenu hasAjaxMenu">[[%SYSTEMWEB%.InstalledPlugins][%JQICON{"plugin"}% %MAKETEXT{"Installed plugins"}%]] 
        <ul class="ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=plugins;icon=application'}"></ul>
    </li><!-- -->
    <li><hr /></li>
    <li>[[http://foswiki.org/Support][%JQICON{"world_go"}% Foswiki Support]] </li><!-- -->
%ENDSECTION{"help"}%

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 id='admin'>%MAKETEXT{"Admin"}%</a>
  <ul>
    %IF{"isweb 'Applications'"
       then="<li>
         [[Applications.%HOMETOPIC%][%JQICON{"application_double"}% %MAKETEXT{"Applications"}%]]
         <ul class=\"ajaxMenu {url:'%SCRIPTURL{"view"}%/Main/SiteMenu?skin=text;section=subwebs;theweb=Applications;icon=application%IF{"defined EXCLUDEWIKIAPPS" then=";excludeweb=%EXCLUDEWIKIAPPS%"}%'}\"></ul>
       </li>"
    }%<!-- -->
    <li>[[%BASEWEB%.%WEBPREFSTOPIC%][%JQICON{"wrench"}% %MAKETEXT{"Web preferences"}%]]</li>
    <li>[[%LOCALSITEPREFS%][%JQICON{"wrench_orange"}% %MAKETEXT{"Site preferences"}%]]</li>
    <li>[[%USERSWEB%.SkyloomSkin][%JQICON{"wand"}% %MAKETEXT{"Site Skin"}%]]</li>
    <li>[[%SCRIPTURLPATH{"configure"}%][%JQICON{"wrench"}% %MAKETEXT{"Configure Foswiki"}%]]</li>
    <li> <hr /> </li>
    <li>[[%USERSWEB%.WikiUsers][%JQICON{"user"}% %MAKETEXT{"Users"}%]]</li>
    <li>[[%SYSTEMWEB%.UserRegistration][%JQICON{"user_add"}% %MAKETEXT{"User Registration"}%]]</li>
    <li>[[%USERSWEB%.WikiGroups][%JQICON{"group"}% %MAKETEXT{"Groups"}%]]</li>
    <li>[[%SYSTEMWEB%.SitePermissions][%JQICON{"key"}% %MAKETEXT{"Site permissions"}%]]</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>
    <li> <hr /> </li>
    <li> <a href='%SCRIPTURL{view}%/Main/TopicDbDump?web_topic=%BASEWEB%.%BASETOPIC%' title='Opens in new window' target='_blank'>%JQICON{"wrench"}%Topic DB Dump</a></li>
  </ul>
</li></noautolink>%ENDSECTION{"adminmenu"}%

Saved file: MenuStyle.css

/*Customized menu stylings*/ 
.natWebMenu {
    background-color: #3D3330;
    margin-bottom: 0px;
}
.natWebMenu li, .natWebMenu li a {
    color: #E6A249;
}
.natWebMenu li .foswikiCurrentWebHomeLink, .natWebMenu li .foswikiCurrentWebHomeLink:hover, .natWebMenu li a.current, .natWebMenu li a.current:hover {
    background-color: #FCF8EC;
    color: #3D3330;
}
.natWebMenu li.sfHover, .natWebMenu li.sfHover > a, .natWebMenu li .foswikiCurrentWebHomeLink:hover, .natWebMenu li a.current:hover, .natWebMenu li a:hover {
    text-decoration: none;
    background-color: #E6A249;
    color: #3D3330;
}
.natWebMenuContents > ul > li > .foswikiCurrentWebHomeLink, .natWebMenuContents > ul > li > .foswikiCurrentWebHomeLink:hover, .natWebMenuContents > ul > li > li > a.current, .natWebMenuContents > ul > li > li > a.current:hover, .natWebMenu li.sfHover, .natWebMenu li.sfHover > a, .natWebMenu li a:hover {
    text-decoration: none;
    background-color: #E6A249;
    color: #3D3330;
}
.natSideBarHeader, .natWebMenu {
    border-bottom: 1px solid #FFCC99;
    border-top: 1px solid #FFCC99;
}
.natWebMenu li {
    border-right: 1px solid #FEE2C3;
}
.natWebMenu ul ul {
    margin-top: 0px;
}

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 Skyloom Wiki? Send feedback
Syndicate this site RSS