**Matrix Version:**5.3.3
I’m attempting to develop a Content Container Template (CCT) that will allow Edit+ users to create columns for sites using frameworks such as Bootstrap, Foundation, Skeleton, etc.
I’m running into some issues with making some conditional statements working in the Simple Edit Layout.
I’m using a Metadata section to allow the user to select how many columns they want in a row (right now just testing with 3 available). They make this selection via a select menu. Then options for configuring the width of each column for various devices will appear below.
I am trying to do this with conditional keywords with a keyword modifier. I get the feeling that this kind of thing won’t “fly” within an Simple Edit Layout:
<!-- Template Edit Layout Start: %globals_asset_name:352832% -->
<div id="tmpedit_id-%asset_assetid%" data-id="%asset_assetid%" data-url="%globals_asset_assetid:352161%" data-asset="%globals_asset_assetid:352162%" data-settings="%globals_asset_assetid:352163%">
<div class="tmpedit_metadata-wrapper colpicker">
%metadata-F_section_353008_values%
</div>
<div class="tmpedit_metadata-wrapper coldata">
%begin_asset_metadata_column-no^:eq:1%
%metadata-F_section_352923_values%
%else_begin_asset_metadata_column-no^:eq:2%
%metadata-F_section_352923_values%
%metadata-F_section_353019_values%
%else_begin_asset_metadata_column-no^:eq:3%
%metadata-F_section_352923_values%
%metadata-F_section_353019_values%
%metadata-F_section_353024_values%
%else_asset%
<span>Please choose an option</span>
%end_asset%
</div>
</div>
I keep getting the warning “The content of asset #352843 is broken by misused conditional keywords. Make sure begin, else and end keywords are used in correct logical order” and of course the logic fails. I’ve tried doing some JS/jQuery hacks as well but it hasn’t worked out very well either.
Obviously what I am trying to do is obscure options that don’t need to show if the user does not need them (i.e. if they only want two columns, only those options should appear).
Can this work. If not, what would be the best approach?