[pmwiki-users] Re: Re: (:toc) on another page
chr at home.se
chr at home.se
Wed Mar 30 05:01:53 CST 2005
On 30 Mar 2005, John Rankin wrote:
> On Wednesday, 30 March 2005 1:44 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Wed, Mar 30, 2005 at 01:27:38PM +1200, John Rankin wrote:
> >> Yes, I dithered over which way to go. I eventually plumped for
> >> (:toc-page PageName:) over (:toc page=PageName:) for these reasons:
> >> - other directives, such as include and redirect are of the form
> >> (:directive PageName:) so I followed this convention, although
> >> I suspect there are exceptions
> >>[...]
> >
> >FWIW, I dithered over the same issue(s) for the latest (:attachlist:)
> >markup, and I ultimately came to the conclusion that followng the
> >include/redirect convention would indicate
> >
> > (:toc PageName:)
>
> Unfortunately, (:toc PageName:) will (currently) produce a
> toc for the /current/ page, using PageName as the text for the
> toc's title line.
>
> I suppose I could get clever and say 'if the thing you think is
> a title is the name of a page that exists and it has a (:toc:)
> directive on it, treate PageName as a page name otherwise treat
> it as the title text of a toc for the current page'.
Please don't :-)
> >over either (:toc page=PageName:) or (:toc-page PageName:). Using
> >ParseArgs(), one can now handle spaces with something like
> >
> > (:directive "Page Name":)
>
> I'm afraid I just treat whatever comes between toc-page and :) as
> if it's a reference to a page and wrap [[ ... ]] around it.
> The makepagename function will strip away any invalid characters.
Just go with (:toc-page PageName:) for this if (:toc page=...:) isn't an
option... Having to add the quotes in (:toc "caption":) would break
backwards compatibility, and might also be considered a nuisance.
Btw.. how do I get quotes into an argument, i.e.
(:directive "Something with "quotes" in it":)
?
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list