Re: sorting viewlets in a grok viewlet manager
Sylvain Viollon <[email protected]> Wed, 27 Jul 2011 10:07:30 +0200
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Op 26 jul 2011, om 21:17 heeft Andrew Altepeter het volgende geschreven: > Hi Devs, > Hello, > We'll be rolling out our Silva 2.3 upgrade soon. During final testing of > our new silva.core.layout public layout, we noticed that a viewlet manager > which had two viewlets in it was rendering the viewlets in the wrong order. > > In each viewlet, we were using the 'silvaconf.priority' directive to try and > force an order to the viewlets. It turns out that this does not work. > While silvaconf.priority is used in some places, for example to control the > order of silva addables in the 'add' list, viewlet managers use this > lower-level grok directive: grok.order. > > I wasn't aware of this directive until now, but it turns out it is clearly > explained in the grok reference manual in the directives section: > http://grok.zope.org/doc/current/reference/directives.html > > So, after replacing the 'silvaconf.priority' directives in my two viewlets > with 'grok.order', my two viewlets are now sorted the way I want them to be. > I should remove that priority and use order instead, leaving a backward compatible import for priority. Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands