hi everybody,

tim hicks and i are migrating Quills to Plone 3.0 and came across the problem that topic- and archive views (which are now handled via custom traversal adapters) are not recognized properly as 'view_templates', i.e. they lack their assigned portlets and blog entries lack a commenting button, etc.

here's a snip from the issue that has been filed at [1]

--snip--
Plone's main_template does a test explained by this comment:

"The div with ID #content will only show up if we're actually on a content view, never on edit forms, control panels etc. It's meant to only wrap the actual content that gets rendered on a page, not the other UI elements."

WeblogEntries are given URLs of the format "/year/month/day/name" and, as a result, fail the test contained in "plone/app/layout/ globals". Because the WeblogEntries are not recognized as being view_templates, the "content" div of the main_template is not rendered. This causes both the contentActionMenus and the comments portions of the page not to be rendered. Most problematic is the dropping of the comments which loses any comments and the button to create comments. Moreover, the main weblog pages leaves off the "comments: x" link.
--snap--

and here's a relevant snippet from the traversal adapter[2]

class WeblogTraverser(DefaultPublishTraverse):

    adapts(IWeblog, IHTTPRequest)

    def publishTraverse(self, request, name):
        # Only intercept certain names...
        if name == 'topics':
# XXX 'topics' should probably not be hard-coded here. Rather,
            # it should be looked up on weblog config.
            return TopicContainer('topics').__of__(self.context)
        elif name == 'authors':
# XXX 'authors' should probably not be hard-coded here. Rather,
            # it should be looked up on weblog config.
            return AuthorContainer('authors').__of__(self.context)
        elif self.isArchiveFolder(name):
            return ArchiveContainer(name).__of__(self.context)
        elif self.isYear(name):
            return YearArchive(name).__of__(self.context)
return super(WeblogTraverser, self).publishTraverse(request, name)

can anybody shed some light on this?

thanks,

tom

[1] http://plone.org/products/quills/issues/97/?
[2] http://dev.plone.org/collective/browser/quills.app/trunk/quills/ app/traversal.py
--
Tom Lazar
http://tomster.org



_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to