Project

General

Profile

Actions

Feature proposal #7980

open

Implement IF substitution support for outputting parent conditions content

Added by krileon over 4 years ago. Updated 3 months ago.

Status:
Assigned
Priority:
Low
Assignee:
Target version:
Start date:
04 May 2020
Due date:
% Done:

0%

Estimated time:

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.

https://www.joomlapolis.com/forum/153-professional-member-support/242459-mix-or-and-and-in-a-cb-substitution#318249

Actions #1

Updated by beat over 4 years ago

  • Target version changed from CB 2.4.6 to CB 2.4.7
Actions #2

Updated by beat about 4 years ago

  • Target version changed from CB 2.4.7 to CB 2.5.0
Actions #3

Updated by beat almost 4 years ago

  • Target version changed from CB 2.5.0 to CB 2.6
Actions #4

Updated by beat over 3 years ago

  • Target version changed from CB 2.6 to CB 2.6.1
Actions #5

Updated by beat over 3 years ago

  • Target version changed from CB 2.6.1 to CB 2.7
Actions #6

Updated by beat almost 3 years ago

  • Target version changed from CB 2.7 to CB 2.7.2
Actions #7

Updated by beat over 2 years ago

  • Target version changed from CB 2.7.2 to CB 2.7.3
Actions #8

Updated by beat over 2 years ago

  • Target version changed from CB 2.7.3 to CB 2.7.4
Actions #9

Updated by krileon about 2 years ago

  • Target version changed from CB 2.7.4 to CB 2.8
Actions #10

Updated by beat almost 2 years ago

  • Target version changed from CB 2.8 to CB 2.8.1
Actions #11

Updated by beat about 1 year ago

  • Target version changed from CB 2.8.1 to CB 2.8.2
Actions #12

Updated by beat about 1 year ago

  • Target version changed from CB 2.8.2 to CB 2.9.0
Actions #13

Updated by beat about 1 year ago

  • Target version changed from CB 2.9.0 to CB 2.9.2
Actions #14

Updated by beat 5 months ago

  • Target version changed from CB 2.9.2 to CB 2.9.3
Actions #15

Updated by beat 3 months ago

  • Target version changed from CB 2.9.3 to CB 2.9.4
Actions

Also available in: Atom PDF