plone / plone.app.blocks

A 'blocks' rendering model for Plone
https://pypi.python.org/pypi/plone.app.blocks
Other
11 stars 4 forks source link

Enable output filters for content layout view #17

Closed datakurre closed 9 years ago

datakurre commented 9 years ago

This would fix https://github.com/plone/plone.app.mosaic/issues/100 required for https://github.com/plone/plone.app.mosaic/issues/85

This would also restore support for Plone 4.2, which should make @hvelarde happy (should enable long pending c.cover upgrade to new p.app.blocks).

vangheem commented 9 years ago

Nice. Well, that was actually rather easy!

datakurre commented 9 years ago

I figured that we have no reason to support portal_transforms here, but can directly call outputfilters.

datakurre commented 9 years ago

@vangheem Should we care about safe html transform?

vangheem commented 9 years ago

Safe html should be used on text tiles only-- if that's possible. On Aug 9, 2015 2:23 PM, "Asko Soukka" notifications@github.com wrote:

@vangheem https://github.com/vangheem Should we care about safe html transform?

— Reply to this email directly or view it on GitHub https://github.com/plone/plone.app.blocks/pull/17#issuecomment-129227423 .

datakurre commented 9 years ago

Text tiles are on layout, so either safe_html should be run to whole layout (with a lot of configuration to make it allow everything mosaic-), or text tiles should be parsed and transformed on save, probably with setter on behavior. Hopefully safe_html, can be called somewhat directly (portal_transform's caching etc feels unnecessary here).

djay commented 9 years ago

Isn't diazo an output filter?

On Mon, 10 Aug 2015 05:58 Asko Soukka notifications@github.com wrote:

Text tiles are on layout, so either safe_html should be run to whole layout (with a lot of configuration to make it allow everything mosaic-), or text tiles should be parsed and transformed on save, probably with setter on behavior. Hopefully safe_html, can be called somewhat directly (portal_transform's caching etc feels unnecessary here).

— Reply to this email directly or view it on GitHub https://github.com/plone/plone.app.blocks/pull/17#issuecomment-129259045 .

vangheem commented 9 years ago

It's a transform. On Aug 9, 2015 8:04 PM, "Dylan Jay" notifications@github.com wrote:

Isn't diazo an output filter?

On Mon, 10 Aug 2015 05:58 Asko Soukka notifications@github.com wrote:

Text tiles are on layout, so either safe_html should be run to whole layout (with a lot of configuration to make it allow everything mosaic-), or text tiles should be parsed and transformed on save, probably with setter on behavior. Hopefully safe_html, can be called somewhat directly (portal_transform's caching etc feels unnecessary here).

— Reply to this email directly or view it on GitHub < https://github.com/plone/plone.app.blocks/pull/17#issuecomment-129259045> .

— Reply to this email directly or view it on GitHub https://github.com/plone/plone.app.blocks/pull/17#issuecomment-129265715 .

datakurre commented 9 years ago

A lot of transforms in Plone. Diazo and Blocks are plone.transformchain (post publishing) transforms. Resolve UIDs and captions is a plone.outputfilters outputfilter, which again is a single transform in portal_transform – similarly to safe_html (and probably they are chained somehow in portal_transforms configuration so that text/x-plone-outputfilters-html becomes safe_html).