Forum OpenACS Development: Re: Help with xowiki

12: Re: Help with xowiki (response to 11)
Posted by Gustaf Neumann on
As before, there are two levels: In order to render a ::xowiki::FormPage with different ::xowiki::Forms, one should use the xowf package. With this the chosen Form depends on the state and optionally by the role of the person viewing the data.

In order to use the different view-*.adp templates, on a per-use case, an approach like the following should work:

   ::xo::Package initialize -url /xowiki
   ::xo::cc set_parameter template_file YOURTEMPLATE
13: Re: Help with xowiki (response to 12)
Posted by Antonio Pisano on
That's the trick, thank you!

For reference, ::xo::cc set_parameter template_file YOURTEMPLATE should be called after package initialization, or ::xo::cc instance won't be available.

For my convenience, I have slightly changed index.vuh for xowiki on my instance, so it accepts also a "template_file" parameter. This way I can force the resolver to use the template I want when viewing xowiki pages, case by case. It's a poor man solution, but does exactly what I need and doesn't harm the package whatsoever.

Putting xowf in the mix could do, as I could say: "use this template when logged and another one otherwise", but probably is a bit too much right now. I will get there some other time.

Thanks again!