But when cb_informations_interne_n2 is equal to 1 or 2, i've the message "You profile isn't complete (100%)"
2 questions :
Why if cb_informations_interne_n2 is > 0 we enter in and just go to the end ?
Why if cb_informations_interne_n2 is > 0 and cb_profil_progression = 100, we have the message who need only appear when cb_profil_progression is != 100 ?
This problem is only present when cb_informations_interne_n2 isn't 0.
Thanks
Last edit: 6 years 5 months ago by krileon. Reason: Added [#7174] tag to subject
It's doing that because it's finding the first occurrence of [cb:else] and using it. In this case it's your alert. Nested IF usage was implemented to kinda support elseif when elseif didn't exist so looks like we forgot to account for that when adding else and elseif. I believe we maybe able to fix this by parsing nested [cb:if] before parsing [cb:else] and [cb:elseif]. Have added a bug ticket to review fixing in a later release.
The best way to avoid this is to just use elseif and else on the parent. The below should work.
Code:
[cb:if cb_informations_interne_n2="0" and cb_etapes_statut!="0" and cb_profil_progression="100"]
<div class="text-center">
#Something
</div>
[cb:elseif cb_informations_interne_n2="0" and cb_etapes_statut="0"]
#Something Else
[/cb:elseif]
[cb:elseif cb_informations_interne_n2="0" and cb_etapes_statut!="0" and cb_profil_progression!="100"]
<div class="alert alert-danger">
Your profile isn't complete ([cb_profil_progression]%).<br />
</div>
[/cb:elseif]
[/cb:if]
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.