Question
If I have a subweb, e.g.
Projects/Ruby/Code what is the best practice recommended way to get the name of the
subweb?
%WEB% returns the entire path. Not what I want.
I'd love a
%WEBPATH% variable that returns the path and
%WEB% to return only the current web (subweb) name, but until that exists,... is
%CALC... the best bet?
Subweb is %CALC{"$SUBSTITUTE(%WEB%,^.*/,,,r)"}%
seems to work. Is there something "better"?
And while I'm at it, is there something I can do to fix the breadcrumbs to show the path elements separately? Short of editing the code?
Environment
--
VickiBrown - 30 Mar 2008
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.
Try
%FLEXWEBLIST{webs="%WEB%" format="$name"}% using
FlexWebListPlugin. There's probably a similar approach using the
BreadCrumbsPlugin
--
MichaelDaum - 30 Mar 2008
And while I'm at it, is there something I can do to fix the breadcrumbs to show the path elements separately? for now your only solution is to use the
BreadCrumbsPlugin. But this is on my TODO list at
ExplodeHierarchalWebsInBreadcrumbs so it may happen in the core someday
--
ColasNahaboo - 31 Mar 2008
To take Michael's suggestion one step further, you could also set a site-wide preference variable in
TWikiPreferences like "Set SHORTWEB = %FLEXWEBLIST...", which would allow you to quickly substitute in the shorter web name. I'm using this in the left bar and it seems to work well.
--
GarySprague - 30 Jul 2008