Closed eightyfive closed 9 years ago
I believe both approaches are viable and I don't foresee implementation problems or a clear winner. The first one should be straightforward and performant: just grep the block with the already parsed content out and put it into a template variable. For the second one you have take care that Phile doesn't pickup the partials (if that's a problem e.g. for building navigation) and you have read additional files and put them through the markup parser.
I would probably decide on which organization scheme suits me more.
Thanks.
Here is an interesting approach: http://learn.getgrav.org/content/modular
Hi,
I was asking myself what would be the best way to achieve 'Content Blocks'. This idea is to be able to output different 'blocks' of content in the templates:
(
about.md
)(
about.html
) (Twig)Or another solution would be to have the following file structure (for /about page):
index.md
would be available as{{content}}
in Twig templates_intro.md
would be available as{{intro}}
(orcontent.intro
?) in Twig templatesWhat are your thoughts on that?