[pmwiki-users] Some documentation added for "markup variables" (Was: How to add a variable to {$var}-markup?)
chr at home.se
chr at home.se
Tue Jun 28 03:38:21 CDT 2005
On Mon, 20 Jun 2005, Patrick R. Michaud wrote:
> On Sun, May 29, 2005 at 08:23:26PM +0200, chr at home.se wrote:
> > How do I go about making a new variable available as markup such as for
> > instance
> > {$metagroup}
> > where I'd assing $metagroup in my config.php of course.
> >
> > PS. I know I could do this using Markup(), but I'm guessing there's an
> > even easier way??
>
> Markup() is the current standard way to do this.
I've added this page
http://www.pmwiki.org/wiki/PmWiki/MarkupVariables
which lists the variables that are available in the markup by default. In
addition, I've added an example of how you can define your own variable -
it'd be good if someone can comment on that bit. For instance, how do you
get the variable to be "dynamically expanded"? I assume this is involves
doing something like:
$GLOBALS['var'] = '...<magic code invoking ...Fmt()...>';
I have also made link to the page above from these pages
http://www.pmwiki.org/wiki/PmWiki/Variables
http://www.pmwiki.org/wiki/PmWiki/SpecialMarkups
http://www.pmwiki.org/wiki/PmWiki/MarkupMasterIndex
For the last page, MarkupMasterIndex, I've moved the
definition/explanations of the variables from that page to
MarkupVariables. I'm not sure this is the best way to do it... one
drawback with doing it like this is that searching for {$Namespaced}
no longer will result in MarkupMasterIndex. Instead, you'll get
MarkupVariables.
Comments and changes welcome :-)
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list