Forum OpenACS Development: Re: xowiki 0.39

Collapse
6: Re: xowiki 0.39 (response to 4)
Posted by Gustaf Neumann on
i am not sure, i understand your question. One can use different templates for xowiki, xowiki provides support for specifying e.g. package specific templates. one sample template is oascs-view, but this is not the default. I put this in to make the update on oacs.org simpler. you can use certainly different templates, like everywhere in openacs.

context-bar: normally, this is set in the site master, i am sure, you know this. the curriculum bar is set as well in the site master, the dotlrn toolbar is in blank-master. i never tried to understand the logic what is supposed to be in what master, in learn, we have simplified this drastically to one master template. Btw, what is contact bar?

why no use all the site template or the master template?

Have you sorted out, what i believe is a configuration problem on your site (your other question in the thread)?

Collapse
7: Re: xowiki 0.39 (response to 6)
Posted by Malte Sussdorff on
My question is as follows.

http://cognovis.de/solutions contains an xowiki page. In this xowiki page you have the part with "Search" and "Index" which comes from xowiki (I stole this). Now, on the left side I want to get the context bar, which is usually set in the site-master.tcl, but which i have taken out of site-master because I do not want it on top or at the buttom of my page, but exactly in the middle.

The right bar and "Unternehmen" "Lösungen" line comes from cognovis-master.

The left bar and the image along with the xowiki code comes from /templates/xowiki/cognovis-view (I have a different structure for templates on our sites, as we are using a custom package for each customer (e.g. /packages/cognovis/) and have a template directory there to hold all the various templates in one place to be changed.

THerefore I need to get the generation of the context bar into Page instproc view (or so I thought). Here is the code which will set a multirow "context" in the callers environment.

# Context bar
if { [info exists context] } {
set context_tmp $context
unset context
} else {
set context_tmp {}
}
ad_context_bar_multirow -- $context_tmp

Sadly adding this to "Page instproc view" along with putting the context_tmp to the variable section did not have the desired result, as context would not be set / passed on (server error).

I do need the multirow though to create the breadcrumb trail as shown in site-master.adp.

So basically I am stuck at the moment, at least I am stuck there :).

With regards to the multilingual problem for the root site, no I did not figure this out yet. Will do hopefully tomorrow.

On a related note I realized that the categories.tcl will display both "de:solution" and "en:solution" in the menu if both are present, instead of presenting the link to the file which is there in the language of choice (and only to this file and not to the other languages as well). Again, something I will look into tomorrow.

Collapse
8: Re: xowiki 0.39 (response to 7)
Posted by Gustaf Neumann on
without looking into the details: if you use for an xowiki instance a custom adp template, you can add at the appropriate place an adp-include into the .adp file containing the bars. i guess, this is the cleanst solution for what you are describing.

when you change the view method - which i would not recommend in your use case - be aware that xowiki passes explicitely the variables as context to the template (if you want, the reverse part of a page contract) in return_page.

none of the includelets are designed to filter out some content in some languages depending on preferences. If this is wanted, it should be done on the SQL layer, since e.g. the categories includelet supports e.g. counting; if you know an efficent way to do this in SQL, we can add this to xowiki. if you are looking for a quick solution for your site, i would recommend to alter the category renderer in the portlet procs to filter out the stuff, you do no want. But please, DON'T commit this to CVS.