Tags:
create new tag
, view all tags

Feature Proposal: Format Parameter for WEB variable

Motivation

The new TopMenuSkin (proposal PatternSkinWithPulldownMenuBar) shows the web name in the menu bar. The WEB variable can get long if the current web is a sub-web or sub-sub-web. For the menu bar it would be good to display just the "Current" web, not the "Grandpa/Parent/Current" web as returned by default by the WEB variable

Description and Documentation

Add a format="" parameter to WEB, INCLUDINGWEB and BASEWEB. The format parameter supports these tokens, with example web.topic "Engineering/Techpubs/Apps.WorkRequestTracker":

  • $web - full web including parents, such as "Engineering/Techpubs/Apps"
  • $parents - parent(s) of current web, such as "Engineering/Techpubs"
  • $current - current web only, such as "Apps"

Examples

%BASEWEB{ format="$current" }% returns the current web, with parents stripped (if any)

Impact

WhatDoesItAffect: Rendering

Implementation

Idea for enhancements

Add a multiple="on" parameter to iterate over each web, similar to the SEARCH parameter of same name to iterate over every line. Add also a separator parameter to separate webs. With this it is possible to create a breadcrumb with links to each parent web's WebHome. Example:

%WEB{
  multiple="on"
  format="[[$web.WebHome][$web]]"
  separator=" >> "
}%

-- Contributors: PeterThoeny - 2010-04-13

Discussion

The format="" parameter is now implemented and documented in SVN trunk.

-- PeterThoeny - 2010-04-19

 
Topic revision: r5 - 2010-04-19 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.