I have used Community Builder substitution for a while now. But it's my first try to get that work in a CB Content Module. The plugin execute the substitution but doesn't return a value. What am I missing here?
The same code, for example just
Code:
[user_id]
is working fine in a CB field. But when I put exactly the same code in a CB Content module, published on the same CB profile page, it doesn't get the right values. There [user_id] returns (the number) 0. Other existing fields returning nothing, but the code [user_id] is gone. So it looks like substitution plugin took place but could not find his way to the right value. When I use a non-existing field, like [nonexisting_field], it outputs [nonexisting_field], like expected.
I put the plugin on top of the plugin order (just in case) but can't get it to work. Any idea why I can't get CB Content Module to work with the same CB substitution?
Substitutions in CB Content Module are always against the viewing user (the user currently logged in and viewing the module). If you want them to be against the displayed profile user you need to use the user="#displayed" parameter. Example as follows.
Code:
[cb:userdata field="user_id" user="#displayed" /]
If you want it to work against both you can use #displayedOrMe as shown below.
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.