Forum OpenACS Development: Re: Help with xowiki
For filtering and pagination I could come up with something that fits my needs for now, but I will look throughly into other options, as one of my requirements will be to establish some best practices for colleagues if this project goes on.
About templating there is still something I don't get. How can I tell my website "Render this xowiki page with template1" and in a second moment "Now render with template2"?
Right now I can customize my templates globally, but I can't use different templates "case by case". Is there a way to do that?
My scenario is using a back-office template when authoring pages, and a front-office one when seeing pages as regular people.
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-g
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.