collective / collective.listingviews

2 stars 4 forks source link

WIP Provide item_object variable in tal expression. #24

Closed instification closed 6 years ago

instification commented 6 years ago

Issues with using the tal statement on a custom listing view in Plone 5. The tal statement provides a brain as item but calling item.getObject() is not allowed ttw.

This PR provides a variable item_object which is a reference to item.getObject.

To avoid unnecessary getObject() calls, only a reference to the function is provided, it must be called in the tal statement.

To do:

djay commented 6 years ago

@instification whitelisting getObject is the better way to do this. This is just hacking around the problem. I'd raise a PR on contentlisting.

instification commented 6 years ago

Have submitted https://github.com/plone/plone.app.contentlisting/pull/30 which negates the need for this PR