[Zope] more dtml-in and content negotiation
Tino Wildenhain
tino@wildenhain.de
Fri, 06 Apr 2001 10:51:26 +0200
Hi Kai,
Kai Hofmann wrote:
>
> Its me again,
> asking stupid questions I havent found answers within the docs :(
>
> Is it possible to extend the
>
> <dtml-in "sub.objectValues()">
> <h2><dtml-var title></h2>
> <dtml-var sequence-item>
> </dtml-in>
>
> code a little, so that will only display objects ending in "_de" or "_en" ?
>
> Is there a kind of "content-negotiation" like I use it with Apache and plain html
> files:
>
> index.html.de
> index.html.en
>
I'm working on it ;) Basically you can do it with a folder-like
object and subobjects naming 'de','en' and so on.
The default method of the folder (index_html)
would then select the right subobject depending on the accept-language
header and availibility. If you want to do it with a python method,
you can have a look at the algorithm in my vary-tag for the selection.
(http://www.zope.org/Members/tino/)
HTH
Tino Wildenhain