Considering that
- almost every time we use a
contentFor we have a wrapper around it (usually a header, footer or just a div with some classes);
- when there is no content for a given region, usually there is no reason to keep the empty wrapper there.
- a wrapper with no content is obviously harder to hide than a wrapper that just does not exist.
- Sometimes it can be considerable hard to hide the empty wrapper without screwing the rest of your css.
Than I infer that we should have a way to use some kind of if statement to check if we should add a region code with its wrapper inside our html.
That's an example to express my idea:
<template name="MyLayout">
<h1>My Layout</h1>
<div>
{{> yield}}
</div>
{{#if [THE FOOTER CONTENT HAS BEEN DEFINED]}}
<footer>
{{> yield region="footer"}}
</footer>
{{/if}}
</template>
Is there a way to do it now? If not, is it possible for us to implement it, and what would be a good "syntax" for that?
Considering that
contentForwe have a wrapper around it (usually aheader,footeror just adivwith some classes);Than I infer that we should have a way to use some kind of
ifstatement to check if we should add a region code with its wrapper inside our html.That's an example to express my idea:
Is there a way to do it now? If not, is it possible for us to implement it, and what would be a good "syntax" for that?