[pmwiki-users] (:subtitle:) markup

Patrick R. Michaud pmichaud at pobox.com
Sun May 28 09:10:01 CDT 2006

On Sun, May 28, 2006 at 02:24:40PM +0200, christian.ridderstrom at gmail.com wrote:
> On Sat, 27 May 2006, Patrick R. Michaud wrote:
> >I'm planning to fix this so that only the (:title:) in the current page 
> >has any effect -- title's in an included page or GroupHeader/GroupFooter 
> >won't override it.
> Although I've been wanting to suggest this myself for both (:title:) and 
> (:description:), I've always refrained from doing it. Why? Well, maybe 
> there is someone out there that does something like this:
> 	The page Site.LocalWikiMacros:
> 		[[#carTitle]]
> 		(:title Cool cars of {$Name} :)
> 		[[#carTitleEnd]]
> 	The page Cars.The80s:
> 		(:include Site.LocalWikiMacrors#carTitle#carTitleEnd:)
> 	The page Cars.The90s:
> 		(:include Site.LocalWikiMacrors#carTitle#carTitleEnd:)
> 	The page Cars.The00s:
> 		(:include Site.LocalWikiMacrors#carTitle#carTitleEnd:)
> I think you get the idea...

Definitely; the possibility of someone doing this is a big part of the
reason I've resisted changing (:title:) thus far.  On the other hand,
if we always say "but someone might be doing something like...", then
we foreclose a lot of opportunities for improvement.  The challenge is
to come up with the correct default based on what most people will
expect or want, and then provide a way to override it.

In this particular case, using (:include:) to set a title based on
a macro is only partly useful -- if another page uses [[Cars.The90s|+]]
or {Cars.The90s$Title} it won't get the custom title.

But in the more general case -- the 'fix' to (:title:) is just going
to be a redefinition of the default (:title:) markup.  If a site
admin needs the old behavior, they can just define (:title:) back
the way it was before.


More information about the pmwiki-users mailing list