So, not sure if this is genius or not, but....
We have some tal template layouts for our content types. These aren't going away just because mosaic is here. They shall remain to bridge the gap.
In the good 'ol days, I used METAL macros to maintain reusable blocks of html.
<div metal:use-macro="context/sidebar_macros/macros/editors_pick">Ed Pick </div>
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:
<div tal:omit-tag="" tal:content="structure context/@@rfasite.basetheme.tiles.editors_pick.EditorsPick"></div>
And it works. Yea!
I want to remove ALL my macros now and replace them with tiles!
Question: Is this good practice or tiles gone wrong? Is there a better way to merge good 'ol tal (or chameleon) with tiles
- If the tile template has any
<head>data - it's not magically pushed to the page's
- I have to use the dreaded
structurekeyword making security a bit harder to manage.
- Browser layers!
- Independent views!
- ZCML registration!
- And Much, much more!
of course the documented
<link rel="tile" \> doesn't work, because TAL/ZPublisher doesn't understand that.
Which makes me want to write a PortalTransform to make it work!
Or maybe I did it wrong?