Now that I've moved the tal from the macro into it's own tile, moved the view code into the tiles very own view, and registred with ZCML, I don't want to maintain two templates, so I replace the macro call with:
I agree. Looks like plone.app.blocks is already installed - it's required by mosaic.
and the "correct" way for blocks to see and use a tile:
A tile is identified by a placeholder element with a data-tile attribute containing the tile URL. plone.app.blocks · PyPI
I'd much rather use that.
I'd like to go this path without having to get into layouts just yet.
I also remember seeing - I think in the old 'vision of deco' docs - that '++tile++/path/to/tile' was suggested, but I didn't see that implemented anywhere.
Ultimately, I'd like to use a tile as a replacement to metal:use-macro, and save layouts for mosaic - allowing me to use the 'new' tiles in 'old' templates.
from zope.interface import implements
from plone.app.blocks.interfaces import IBlocksTransformEnabled
from plone.dexterity.browser.view import DefaultView
class StoryView(DefaultView):
""" The Default View for Stories """
implements(IBlocksTransformEnabled)
and my 'disadvantages' just disappeared.
Thank you @jaroel I feel like I leveled up a bit.
especially because I just totally guessed at the location of IBlocksTransformEnabled and nailed it.