Substitution conditioning case...

1 year 5 months ago #331613 by liaskas
Substitution conditioning case... was created by liaskas
Hello We are trying to use subtitutions in some fields descriptions and it works pretty fine with reason="register, edit, search etc"

What we can not find how to accomplish is to condition substitutions according to the user list that we are viewing.

example:
We have 2 userlists that both have search enabled.

In a field description we use... [cb:if reason="search"]...[/cb:if]

Instead of "... " above, how can we condition according to the userlist we are viewing? Can we do something like [cb:if list="1"]This text is for field in list 1[cb:elseif list="2"]This text is for field in list 2[/cb:elseif][/cb:if]so that the final looks like this?

[cb:if reason="search"][cb:if list="1"]This for field list 1[cb:elseif list="2"]Text for field list 2[/cb:elseif][/cb:if][/cb:if]

Is it possible to condition by list id?
If not...
Is it possible to condition by displayed page url?

Can you please give an example?

Thank you!

 

Please Log in to join the conversation.

1 year 5 months ago #331618 by krileon
Replied by krileon on topic Substitution conditioning case...
There's no substitution functionality for checking if you're viewing a specific userlist.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 5 months ago #331619 by liaskas
Replied by liaskas on topic Substitution conditioning case...
Thank you for your reply Krileon.
substitution functionality for checking the whole or part of the URL you're viewing?

Please Log in to join the conversation.

1 year 5 months ago #331627 by krileon
Replied by krileon on topic Substitution conditioning case...
There's no substitutions for getting the current URL or manipulating it in any way. Will review seeing if this can be added in a future release. At the very least being able to condition against the Itemid of a URL for conditional content based off menu item.

forge.joomlapolis.com/issues/9073


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 5 months ago #331629 by krileon
Replied by krileon on topic Substitution conditioning case...
Was able to extend the substitution behavior with the following.

New IF Operator:
contains = STRING contains STRING
!contains = STRING does not contain STRING

New IF Behavior:
[cb:if url contains "&listid=123"]The URL I am on has listid of 123 in it.[/cb:if]
[cb:if url !contains "&listid=123"]The URL I am on DOES NOT have listid of 123 in it.[/cb:if]
[cb:if menu_id="1"]The URL I am on contains an Itemid of 1[/cb:if]

New URL Location:
[cb:url location="current" /] = URL currently viewing

Once reviewed, merged, and released this should help accomplish what you're wanting.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: liaskas

Please Log in to join the conversation.

1 year 5 months ago #331641 by liaskas
Replied by liaskas on topic Substitution conditioning case...
Thank you Krileon!
Fast and always helpful.

Many thanks to the forge guys too.
Waiting for version 2.7.5 with anticipation...

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn