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

chr at home.se chr at home.se
Fri Oct 7 12:16:13 CDT 2005


On Fri, 7 Oct 2005, Miller, Joshua wrote:

> 
> Thank you all for your help!
> 
> Now, I am trying to create a button to insert 
>  (:title TypePageTitle:)
>  !{$Title spaced}
> 
> Into the Wiki with a single click.
> 
> My button code in y config file looks like:

Hmm... sounds like you need to quote it somehow. For a general string, 
e.g. "$Titlespaced" you'd do "\$Titlespaced". For a string in single 
quotes this is generally not needed, e.g. '$Titlespaced', but I'm guessing 
the string below in single quotes is evaluated later on. So try the 
modified code below (I've inserted '\\' which I hope becomes a '\'):

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

Btw, is there some cookpage where all these additional ideas for 
GUI-buttons could be written down?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list