• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7814: Feature request: Enable topmenuskin breadcrumbs to be turned off in selected webs

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine topmenuskin Enhancement New      

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Problem

It is possible to turn on topmenuskin breadcrumbs globally in Public/TWikiPreferences with '* Set BREADCRUMBS = 1' but trying to turn it off selectively, eg. in public facing webs with a nice DashBoard where the trail is superfluous such as Public/WebPreferences with '* Set BREADCRUMBS = 0' does not work.

Analysis

The code in templates/view.topmenu.tmpl only checks that the BREADCRUMBS variable has been defined to activate the feature. There is no TWiki meta-code that does the opposite of the 'Set', ie. a '* Unset BREADCRUMBS' command, so it is not possible to undefine the variable in say, Public/WebPreferences.

Solution

Made a small modification to templates/view.topmenu.tmpl to test that the BREADCRUMBS variable has been defined AND has a value >0 before activating the feature. Now writing '* Set BREADCRUMBS = 0' in eg. Public/WebPreferences turns off the feature in that web while leaving it on in all others.

Here is a patch to templates/view.topmenu.tmpl to make it possible to selectively turn off topmenuskin breadcrumbs.

-- TWiki:Main/TomCrane - 2017-06-08

I discovered a clash between the use of BREADCRUMBS as a variable here in topmenuskin and in BreadCrumbsPlugin which also defines a BREADCRUMBS variable. Using assignments such as '* Set BREADCRUMBS = 1' in eg. WebPreferences to control the display of the topmenuskin breadcrumbs trails at the top of each page, results in eg. %BREADCRUMBS% TWiki ML calls elsewhere to the BreadCrumbsPlugin code returning '1' instead of the expected breadcrumbs trail.

My solution: Rename the BREADCRUMBS variable in topmenuskin and other references to it to TOPMENU_BREADCRUMBS.

Tom Crane

-- TWiki:Main.TomCrane - 2017-09-14

ItemTemplate
Summary Feature request: Enable topmenuskin breadcrumbs to be turned off in selected webs
ReportedBy TWiki:Main.TomCrane
Codebase 6.0.2
SVN Range TWiki-6.0.2-trunk, Thu, 01 Jun 2017, build 30349
AppliesTo Engine
Component topmenuskin
Priority Enhancement
CurrentState New
WaitingFor

Checkins

TargetRelease

ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch topmenu-breadcrumbs.patch r1 manage 1.0 K 2017-06-08 - 18:38 TomCrane Patch to templates/view.topmenu.tmpl to make it possible to selectively turn off topmenuskin breadcrumbs
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2017-09-14 - TomCrane
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback