Greg Ward schrieb: > I'm having problems defining custom variables on a page following the > instructions in HelpOnVariables. I think there is definitely a doc bug > in there; that page is not very clear on what is possible, never mind > how to do it. > > First: from the wording in HelpOnVariables, it's not even clear that I > *can* define custom variables. The section header "Expanding Variables" > is ambiguous: to most programmers, "expanding" a variable means, for > example, replacing "@USERNAME@" with "gward". But it's also possible > for it to mean "expand the set of variables by defining new ones". That > is kind of what it sounds like. If so, I would suggest rewriting this > section as: > > """ > == Defining New Variables == > > You can add your own custom variables to any page. Just create a new > sub-page called `MyDict` and enter a dictionary of custom variables there > (see HelpOnDictionaries). For example, to add variables `REVIEWER` and > `REVIEW_DATE` to `MyPage`, create `MyPage/MyDict` and give it content like > {{{ > REVIEWER:: JohnDoe > REVIEW_DATE:: 2008-10-20 > }}} > """ > > Is that correct? > > Second: if that *is* correct, it doesn't seem to work in 1.8.0rc1. At > any rate, I have created a "/MyDict" subpage and am unable to access > those variable values using <<GetVal()>>. Is there a working example of > this feature somewhere? >
Hi Greg the page MyDict has to be created as a subpage of your homepage I have there on my ReimarBauer/MyDict some vars for me defined and I can for example write @IMG@ on a page and this is expanded to my image. <<GetVal(ReimarBauer/MyDict,IMG)>> is also expanded to the value of the key. cheers Reimar ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user