[pmwiki-users] Embedding (:directive:) inside of (:text_var: ... :)
The Editor
editor at fast.st
Wed Apr 11 17:16:10 CDT 2007
On 4/11/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Several people have commented that they sometimes want/need
> to place directives inside of hidden page text variables -- i.e.,
> to do something like:
>
> (:myvar: (:pagelist:) :)
>
> such that $:myvar returns a value of "(:pagelist:)". Of
> course, this doesn't work at present because the "(:...:)"'s
> don't nest, so that the (:pagelist:) directive has the effect
> of inadvertently closing off the page text variable.
>
> A couple of days ago I thought of an easy way that we could
> avoid this problem by allowing multiple colons for markers
> on page text variable directives. Then the above could be
> written as:
>
> (::myvar: (:pagelist:) ::)
>
> This does the same as (:myvar: ... :), except that the presence
> of "(::" at the beginning of the page text variable requires
> a matching "::)" to close it. This makes it easier to embed directives
> inside of hidden page text variables. And it can be generalized to
> handle arbitrary numbers of colons:
>
> (::::myvar: I like colons! ::::)
>
> Other directive markups that potentially have embedded
> directives might also be able to use the multiple-colon approach.
>
> I personally don't have any use or need for this, but it
> did occur to me and so I thought I'd mention it in case
> there are a lot of others who could use it. Implementing it
> would be a minor change to the page text variables code.
>
> Thanks!
>
> Pm
Pm, I would like this! It would save me from having to use {( )} in
text vars and then convert them back to directives. Plus it makes it
easier--as I can test live code, then just cut and paste it into the
directive. I think it would be great!
Thanks!
Cheers,
Dan
More information about the pmwiki-users
mailing list