63

Is there a way to mark methods traversable in grok.CodeView classes, like you can do with Zope 3 BrowserView and allowed_attributes ZCML configuration directive?

I found docs about grok.traversable() but it looks like such method does not exist in five grok package.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435

1 Answers1

5

It is not possible: "the render() method is the only traversable in grok.codeView classes"

as stated in: https://developer.plone.org/templates_css_and_javascripts/javascript.html

Max Langerak
  • 1,187
  • 8
  • 17
  • 1
    Haha. I wrote that line myself long time ago. I am not sure how much truth it holds, so I would rather have a direct reference to Grok source code. In any Grok is pretty much dead project by now. – Mikko Ohtamaa Mar 28 '14 at 12:27
  • 1
    @MikkoOhtamaa: :D, your line might be true, at least `view/w/details/render`, as suggested in the [docs](http://developer.plone.org/reference_manuals/external/plone.app.dexterity/custom-views.html#simple-views), doesn't work with Dexterities, which were created TTW (model-driven). – Ida Mar 29 '14 at 07:09
  • Thanks Max Langerak, for digging this out! – Ida Mar 29 '14 at 07:11