On Thu, 2009-09-03 at 12:54 +0200, M.-A. DARCHE wrote:
> * Since the theme resolver is being worked on, I would love to have
>   the theme resolver be able to deal with a theme associated to a
> unique
>   page and not a whole directory as it is mandatory now.
> 
>   This would be more flexible than it is now. For example on the
>   http://www.aful.org/ CPS portal, we have web sites being
>   only one page, for example
>   http://bons-constructeurs-ordinateurs.info/
>   http://bons-vendeurs-ordinateurs.info/
>   With the current limitation we have to create a directory
> (workspace)
>   with a unique page in it for each of those web sites.

I've came accross the same kind of problem : basing theme negociation on
"bottom most folder" is not enough for me anymore.

In my previous reply, I had forgotten my own design (!), namely that the
theme negociator is actually registered as an adapter.
CPSDesignerThemes/configure.zcml extract:

> <adapter
>       provides=".interfaces.IThemeEngine"
>       for="OFS.interfaces.IObjectManager
>          zope.publisher.interfaces.http.IHTTPRequest"
>       factory=".negociator.CPSSkinsThemeNegociator"
>       />

Therefore, if you need the theme pages to rotate according to moon
phases, you just have to declare another adapter in your product's
overrides.zcml :-)

More seriously, I will contribute very soon an alternative adapter that
covers both the use cases you mention and mine. It's still not very
powerful, but better to share it than keeping it in a private project.
https://svn.nuxeo.org/trac/pub/ticket/2034

Cheers,

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to