Feature proposal #7980
openImplement IF substitution support for outputting parent conditions content
Description
If you try to use ELSEIF as a means of having alternative conditions for an IF substitution you have to duplicate your content. This isn't ideal and is a bit of a waste of storage space and management for it is frustrating. Review implementing support for inheriting a parent conditions content. Example of this as follows.
[cb:if PARAMETER="REPLACEMENT" and PARAMETER="REPLACEMENT"]CONTENT[cb:elseif PARAMETER="REPLACEMENT" and PARAMETER="REPLACEMENT"]DUPLICATE_CONTENT[/cb:elseif][cb:else]DIFFERENT_CONTENT[/cb:else][/cb:if]
If I want my IF and ELSEIF to output the same content I have to duplicate it. There should be a means of passing the parent content to the child condition so the child condition can output it if desired. Something like the below for example.
[cb:if PARAMETER="REPLACEMENT" and PARAMETER="REPLACEMENT"]CONTENT[cb:elseif PARAMETER="REPLACEMENT" and PARAMETER="REPLACEMENT"][parent_content][/cb:elseif][cb:else]DIFFERENT_CONTENT[/cb:else][/cb:if]
Substitution would probably need to be more strict to avoid conflicts with other substitutions like it, but the idea would be you don't need to duplicate content for OR cases. This really is only a problem if you have an OR condition that you want to also combine with an AND.