Item12422: Support PAGETITLE Macro in stock template
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
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