[SOLVED] CB Content Bot - new line character ignored

9 months 1 day ago - 8 months 4 weeks ago #322020 by eriknz
I am using Cb Content Bot with great satisfaction but stumbled upon one peculiarity.
If I display a text field (with several lines of text) Content Bot ignores the new lines and displays all text on a single line. This is of course different from User Lists that display the text area as they are created in the User profile.
I am now working around that with the Regular Labs ReReplacer plugin, but it seems odd that Content Bot is not following the same rules as CB List.
Is that an idea for an update?

Please Log in to join the conversation.

8 months 4 weeks ago #322037 by krileon
Replied by krileon on topic CB Content Bot - new line character ignored
Text fields don't have new lines at all in them. Do you mean a Text Area field or Editor Text Area field? If so please be sure you're using [cb:userfield field="FIELD_NAME" /] substitutions so you get the formatted output. If you're using [FIELD_NAME] you will get the raw database value. Please see the below tutorial regarding substitution usage.

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.

8 months 4 weeks ago #322051 by eriknz
Replied by eriknz on topic CB Content Bot - new line character ignored
Thanks for the response.
I wasn't aware of the substitutions at all. But
I have a text field (which is obviously multi line) with field name cb_payments_clubs.
I want to display the content of that field in the same way as it appears in user lists for a user who is logged in at the front end.

Originally I made the mistake to put [cb_payments_clubs] which (I now understand) removes html. So all content was on one line.
When I put [cb:userdata field="cb_payments_clubs" /] I get the same, content all on one line. Makes sense in view of the substitution rules.

But now when I now put [cb:userfield field="cb_payments_clubs" /] nothing is displayed.

What am I doing wrong now?
Sorry to be so ignorant. Must be close to year's end.

Erik

Please Log in to join the conversation.

8 months 4 weeks ago #322063 by krileon
Replied by krileon on topic CB Content Bot - new line character ignored

But now when I now put [cb:userfield field="cb_payments_clubs" /] nothing is displayed.

That means the field isn't visible on profile. Ensure the field is set to display on profile. If you don't want it displayed on profile then move it to a tab that's in a not shown on profile tab position. You should then be able to use it for substitutions fine.


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: eriknz

Please Log in to join the conversation.

8 months 4 weeks ago #322073 by eriknz
Replied by eriknz on topic CB Content Bot - new line character ignored
The field is visible in profile and the tab isn't. But you got me on track because the problem was that the access level of the tab was at moderator level and should be registered.
Now it shows properly.

Thanks a lot for the advice.
Erik

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn