Question
I would like to have a single WebLeftBar for all sub-webs. I understand that I can form a template web for creating new sub webs that use an existing WebLeftBar as a template, but I'd like to have a sigle WebLeftBar so I don't have to update existing sub webs or propagate changes when I perform updates.
Is there an alternative to creating a blank WebLeftBar that includes a WebWideLeftBar and instead have all webs share the same page?
Environment
--
CharlesLong - 05 Jul 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
I've tried imitating this with an include of a WebWideLeftBar that, by default, contains the WebLeftBarWebsList and the "tools" but, much to my disappointment, "tools" are relative to the web they are in and thus don't work for an include.
--
CharlesLong - 10 Jul 2007
Alternatively you could create a
viewleftbar.pattern.tmpl subtemplate (see
PatternSkinCustomization).
--
ArthurClemens - 10 Jul 2007
What you can do is use the following expression:
%CALC{"$REPLACE(%WEB%,$FIND(.,%WEB%),$LENGTH(%WEB%))"}%
This will return the name of the 'root' web. Eg, if Support is Foo.Bar.Baz, it will return Foo. You can use this expression in the proper template, eg. viewleftbar.pattern.tmpl, and replace
%INCLUDE{"%WEB%.WebLeftBar"}%
with
%INCLUDE{"%CALC{"$REPLACE(%WEB%,$FIND(.,%WEB%),$LENGTH(%WEB%))"}%.WebLeftBar"}%
You could decorate this with some conditional rendering if you only need this feature for some webs.. You could even make it overrideable, by first checking for a topic in the subweb, eg
OverrideWebLeftBar, and include that if it is there and use the CALC expression if it isn't.
--
KoenMartens - 20 Aug 2007