I made my first attempt at using property sets with my templates, rather than setting parameters explicity. Instead of this:
[[$html?
&customCssChunk=`wwwCssBlock`
&customScriptsChunk=`wwwScriptsBlock`
&customTopDesignChunk=`wwwTopDesignBlock`
&customHeaderChunk=`wwwHeader`
&navigationChunk=`wwwNavigation`
&contentLayout=`75_25`
&customFooterChunk=`wwwFooter`
]]
I created a property set called wwwTemplate, and changed the template code to this:
[[$html@wwwTemplate? &contentLayout=`75_25`]]
("contentLayout" is the one parameter that can vary within that design/template family, so I kept it out of the property set).
I’ve also added the wwwTemplate property set to my template AND (after that didn’t work) to my $html chunk.
This isn’t working though. My two theories on why are
- I’m doing it wrong
- Property sets don’t work quite the way I was expecting them to
The way my templates work is, those parameter values are the names of chunks, and they get swapped in to placeholders in order to call those chunks. But this all happens several levels deep: [[$html]] calls [[$head]], which calls [[$css]], which calls [[$css]], which has the placeholder [[$[[+customCssChunk]]]]. With direct parameter calls, this all just works... somehow [[$html]] manages to pass the value for +customCssChunk on through all those other chunks so it behaves the way I need it to. (I realize/confess that I am woefully ignorant on the order in which chunks get parsed).
Is there a reason why this wouldn’t/shouldn’t work with a Property Set? Or am I doing it wrong? Do I maybe need to add that property set to all of the chunks involved?