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.
Updated by beat over 4 years ago
- Target version changed from CB 2.4.6 to CB 2.4.7
Updated by beat about 4 years ago
- Target version changed from CB 2.4.7 to CB 2.5.0
Updated by beat almost 4 years ago
- Target version changed from CB 2.5.0 to CB 2.6
Updated by beat almost 3 years ago
- Target version changed from CB 2.7 to CB 2.7.2
Updated by beat over 2 years ago
- Target version changed from CB 2.7.2 to CB 2.7.3
Updated by beat over 2 years ago
- Target version changed from CB 2.7.3 to CB 2.7.4
Updated by krileon about 2 years ago
- Target version changed from CB 2.7.4 to CB 2.8
Updated by beat almost 2 years ago
- Target version changed from CB 2.8 to CB 2.8.1
Updated by beat about 1 year ago
- Target version changed from CB 2.8.1 to CB 2.8.2
Updated by beat about 1 year ago
- Target version changed from CB 2.8.2 to CB 2.9.0
Updated by beat about 1 year ago
- Target version changed from CB 2.9.0 to CB 2.9.2