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
 

QuestionForm edit

Subject Documentation
Extension NatSkin
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic revision: r4 - 26 Jul 2017, SebastienTremblay - This page was cached on 27 Jul 2017 - 08:08.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License