Forum OpenACS Development: Dynamically add property tags

Collapse
Posted by Malte Sussdorff on
I am in the need of having to dynamically (code based) pass property tags to the master. This means, I have a list of name value pairs which need to be passed as properties.

The initial idea of using:

set property_stuff "<property name=foo>value</property>" and adding @property_stuff;noquote@ to the .adp file does not work.

How would you do it?

Would having <multiple name=property_stuff><property name="@property_stuff.name@">@property_stuff.value@</property></multiple> work?

I am not sure how the parsing in ADP happens. The first approach fails because the property tags seem to be parsed before the variable substitution. We also tried <%= set property_stuff %> and the like, but that failed as well.

Collapse
Posted by Torben Brosten on
Hi Malte,

If you are passing the properties from an include, take a look at this discussion for hints: https://openacs.org/xowiki/tip-passing-values-from-an-include

cheers,

Torben

Collapse
Posted by Malte Sussdorff on
The Tip is helpful, but not really what I need. Here is the full story.

In the application there exists a custom master which expects the variable "root_menu" to be passed. The XoWIKI application does not know about this. So Gustaf and I tried to have a property_stuff variable in XoWIKI, which would contain the property_code so we could then put it up on the pages generated by the ADP Generator in xowiki.

From the TIP though I assume that we could just upvar the stuff through the ADP levels, though, hmm.....

Collapse
Posted by Dave Bauer on
Some tags parse adp vars in the tag attributs, and some do now. So i would say, check out the include tag, for example, and fix the property tag to parse it's attributes.