This question about Documentation: Answered

Howto define a Web specific sidebar or menubar in NatSkin?

Summary

I tried to create a web specific sidebar and menubar using NatSkin. But it failed.

Details

From the docs the sidebar is defined in System.SideBar and the Menu in System.SiteMenu.

So i create WebNameGoesHere.SideBar and WebNameGoesHere.SiteMenu, copied the orginal content and made modifications. But the modifications do not show up.

So how to customize SiteMenu and SiteBar in NatSkin on a per web (or maybe even on a per topic) base?

Template overwrite worked though

I read about NatSkin and about how templates are found and overwritten.

For example: I was able to overwrite the messages.nat.tmpl unsing a TopicTemplate by adjusting the order of Templates in configure ={TemplatePath}= to:
$web.$skinSkin$nameTemplate,
$Foswiki::cfg{TemplateDir}/$web/$name.$skin.tmpl,
$Foswiki::cfg{TemplateDir}/$name.$skin.tmpl,
$Foswiki::cfg{SystemWebName}.$skinSkin$nameTemplate,
$Foswiki::cfg{TemplateDir}/$web/$name.tmpl,
$Foswiki::cfg{TemplateDir}/$name.tmpl,
$web.$nameTemplate,
$Foswiki::cfg{SystemWebName}.$nameTemplate

and create an overwrite like like =WebNameGoesHere.NatSkinMessagesTemplate =.

This worked.

-- WolfgangAlper - 22 Jun 2014

Define a web-specific sidebar/menu/etc component using WebNameGoesHere.WebSideBar. See also NatSkin#WebComponents

-- MichaelDaum - 23 Jun 2014

Hello,

i want to create a horizontal menu bar per each web of the wiki. After installing the natskin-extension, i created a topic WebNameGoesHere.WebSiteMenu, but the menu stays the same.

Any ideas? Creating WebNameGoesHere.WebSideBar worked.

-- MichaelSchmid - 13 Nov 2016

Hi,

I'm running into the same issue. I'm new to foswiki in general but here goes: I've created a SiteMenu that is just a copy with modifications of SiteMenu

I don't see my SiteMenu changes reflected and i'm unsure were to look at this template configuration listed above by WolfgangAlper

-- SebastienTremblay - 26 Jul 2017

I think some folks confusion her arises from not quite understanding the naming convention used by NatSkin#WebComponents. The naming convention starts with either Site (to apply site-wide) or Web for a single web, plus the name of the component (i.e. SideBar, Menu, BottomBar, etc). So, if you want to create a custom sidebar for the entire site, copy System.SiteSideBar to Main.SiteSideBar. If you want to customize the side bar only for a specific web, copy System.SiteSideBar to that web and rename it as YourWebName.WebSideBar. Hope this helps clarify.

-- LynnwoodBrown - 10 Mar 2021
 

QuestionForm edit

Subject Documentation
Extension NatSkin
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic revision: r5 - 10 Mar 2021, LynnwoodBrown
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy