CB auto action include php file and substitutions

1 month 2 weeks ago #327314 by activha
Thanks !

Always in auto action, can I use CB substitutions with conditional statements in a html zone ?

For instance for an edit action I need to replace the placeholder with a test like :
[cb:if var1_params_activ>0][var1_params_activ][/cb:if]
I also tried
[cb:if [var1_params_activ]>0][var1_params_activ][/cb:if]

but it's still echoed like it and not substituted.
Should I revert to PHP instead of HTML zone ?

Please Log in to join the conversation.

1 month 2 weeks ago #327316 by krileon

Always in auto action, can I use CB substitutions with conditional statements in a html zone ?

Yes.

but it's still echoed like it and not substituted.

Because your substitution is incorrectly formatted. Our substitutions are well documented below. Neither of your examples are valid or shown as valid in our documentation.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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 month 2 weeks ago #327317 by activha
OK didn't check it would not apply here :-(
Sorry...
Have found another solution

Please Log in to join the conversation.

1 month 2 weeks ago #327318 by krileon

OK didn't check it would not apply here

Don't understand what you mean. Yes, you can use IF substitutions in the HTML output. The reason yours aren't working is because you've formatted them wrong. The below will work fine.

[cb:if var1_params_activ>"0"][var1_params_activ][/cb:if]

This assumes the param activ exists in whatever var1 is and it's greater than 0. As I said the format of your 2 examples does not match our documentation. You cannot just makeup substitution formats. If it doesn't follow what is documented it will not work.


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 month 2 weeks ago #327319 by activha
Oupss did not even see the missing quotes
Time to stop for tonight, eyes tired !
Thanks for your patience ;-)
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn