You are here: Foswiki>Tasks Web>Item12422 (24 Dec 2014, GeorgeClark)Edit Attach

Item12422: Support PAGETITLE Macro in stock template

pencil
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: VickiBrown
Waiting For:
Last Change By: GeorgeClark
Although programmers really like strictly named "Keys" to topic names (like this one, Item12422 :-), less technical users want to see something more descriptive in the Browser page title, history, bookmarks, etc.

Having seen a few references to a PAGETITLE variable floating around, I implemented this variable "wiki-side" in a skin template that overrides %TMPL:DEF{"windowtitle"}% (Reference).

I would like to see this code added to foswiki.tmpl to avoid the need for an extra cover/skin and to make PAGETITLE part of the standard distribution so that everyone can benefit, not just "my clients".

Note: I see that this Tasks application is using something akin to PAGETITLE, as part of the ItemView View template (i.e. the page title is Item12422: Support PAGETITLE Macro in stock template, not Item12422 < Tasks). Suport for the PAGETITLE variable will make changng the title easier, without need for a special VIEW_TEMPLATE.

Template Code

Current code in foswiki.tmpl
%TMPL:DEF{"windowtitle"}%<title>%TMPL:P{"titleaction"}% <nop>%BASETOPIC%%TMPL:P{"titlesep"}%%BASEWEB%%TMPL:P{"titlesep"}%<nop>%WIKITOOLNAME%</title>%TMPL:END%

Recommended new code
%TMPL:DEF{"normalwindowtitle"}%<title>%TMPL:P{"titleaction"}% ** <nop>%TOPIC% ** %TMPL:P{"titlesep"}% %WEB% %TMPL:P{"titlesep"}% <nop>%WIKITOOLNAME%</title>%TMPL:END%

%TMPL:DEF{"dbwindowtitle"}%<title>%TMPL:P{"titleaction"}%<nop>%PAGETITLE% %TMPL:P{"titlesep"}% %WEB% %TMPL:P{"titlesep"}% <nop>%WIKITOOLNAME%</title>%TMPL:END%

%TMPL:DEF{"windowtitle"}%%TMPL:P{"titleaction"}%%IF{"defined PAGETITLE" then="%TMPL:P{"dbwindowtitle"}%" else="%TMPL:P{"normalwindowtitle"}%"}%%TMPL:END%

-- VickiBrown - 11 Mar 2013

I'm not quite understanding where PAGETITLE comes from. Is it just a SET statement in the current topic. Setting this to proposal required.

-- GeorgeClark - 24 Dec 2014
 

ItemTemplate edit

Summary Support PAGETITLE Macro in stock template
ReportedBy VickiBrown
Codebase
SVN Range
AppliesTo Engine
Component
Priority Enhancement
CurrentState Proposal Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r3 - 24 Dec 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy