[pmwiki-users] RE: RE: How to create Directive for Titles

Jonathan Scott Duff duff at pobox.com
Fri Oct 7 14:53:09 CDT 2005


On Fri, Oct 07, 2005 at 09:06:58PM +0200, Dominique Faure wrote:
> This was not so hard: in fact we only needed something whing could be
> rendered *at the end* as a '$':
> 
> $GUIButtons['h1'] = array(400,
>                          '(:title TypePageTitle:)\\n!{$Titlespaced} ',
>                          '\\n', '$[Page Title]',
>                          '$GUIButtonDirUrlFmt/h2.gif"$[Page Title]"');

I think you guys mean this:

$GUIButtons['h1'] = array(400,
                         '(:title ',
                         ':)\\n!{$Title}',
                         '$[Page Title]',
                         '$GUIButtonDirUrlFmt/h2.gif"$[Page Title]"');

so that whatever text is highlighted gets used as the title. Also, using
{$Titlespaced} doesn't make much sense (to me) if you're typing in the
title anyway, so I've replaced it with {$Title}.

Though, this seems of limited usefulness as a GUI button. It's a button
that you'll use at most once per page whereas the other GUI buttons can
be used over and over again throughout the document.

It seems like it would be best to just have a specialized markup (as the
subject of this thread says) that gets transformed into the appropriate
markup on page save. I seem to recall that PmWiki has this ability, but
I don't remember how to trigger it off hand.

-Scott
-- 
Jonathan Scott Duff
duff at pobox.com




More information about the pmwiki-users mailing list