CB Substitutions profile information output

3 years 6 months ago #320991 by bizguy
I have built a custom YOOtheme page, that displays select information about a member.
I had thought to use CB Substitutions to access the profile information to be displayed, using the ?profileID=XXX that I am passing to the page in the URL.

I have had no success attempting to put the ID in the REPLACEMENT position as I either get the code being output, or no output.
[cb:userdata field="FIELD_NAME" user="REPLACEMENT" /]

Can I use
<?php echo '[cb:userdata field="name" user="'.$_GET['profileID'].'" /]'; ?>
or
[cb:userdata field="name" user=$profileID /]
in some form?

Thanks,

Ed

Please Log in to join the conversation.

3 years 6 months ago #320995 by bizguy
Replied by bizguy on topic CB Substitutions profile information output
So in an attempt to solve this issue, I installed RegularLabs extension ReReplacer, which allows me to make changes to content on the fly. The extension successfully places the $_GET into the CB Substitutions field as in
[cb:userdata field="name" user="723" /]
The page then does not convert the CB Substitutions code into the contents of the name field, but simply outputs the code above.
I thought that maybe reordering the plugins, putting ReReplacer before the CB System plugins would allow the changes to take effect before the page was rendered, but the output remains the same.

I am trying to avoid coding a page, which will not allow it to utilize the features and benefits of the templating and Community Builder extensions in the future, so hopefully a solution exists.

Ed

Please Log in to join the conversation.

3 years 6 months ago - 3 years 6 months ago #320998 by krileon
Replied by krileon on topic CB Substitutions profile information output
There's no functionality for that. You'd need that information sent to the substitution parsing API for it to be available for use.

I've no idea what a YOOtheme page is, but you should be able to do what you're wanting using a Code action in CB Auto Actions then set Method to HTML and output whatever page HTML structure you like. You can then link a Joomla menu item to that auto action using Community Builder > Plugin menu type. This effectively lets you build your own entirely custom pages with all the benefits of CB Auto Actions.

The page then does not convert the CB Substitutions code into the contents of the name field, but simply outputs the code above.
I thought that maybe reordering the plugins, putting ReReplacer before the CB System plugins would allow the changes to take effect before the page was rendered, but the output remains the same.

ReReplacer is a System plugin. CB substitutions are parsed by a Content plugin. So you won't be able to fix this issue due to load order. All content replacement plugins should be a Content plugin. ReReplacer has designed their usage incorrectly as a System plugin.


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.

Moderators: beatnantkrileon
Time to create page: 0.183 seconds

Facebook Twitter LinkedIn