[SOLVED] CB Articles - List full text rather than link

11 years 6 months ago - 11 years 6 months ago #212797 by dwaine
Using CB Articles plugin, is it possible to display complete article(s) in a members profile, rather than just a link to the article(s)??

Please see attached screen-shots.



Attachments:

Please Log in to join the conversation.

11 years 6 months ago #212798 by dwaine
Sorry I forgot to list my versions in the above question, they are:

Joomla 2.5.7 CB 1.8.1, I am also using CB ProfilePro to display the profiles

Please Log in to join the conversation.

11 years 6 months ago #212891 by krileon

Using CB Articles plugin, is it possible to display complete article(s) in a members profile, rather than just a link to the article(s)??

Sure, edit the template and adjust it to display however you want. The article object is populated with the article text and can be accessed by using the below.

Into only:
$row->getArticle()->article_intro

Body only:
$row->getArticle()->article_full

Intro and body combined:
$row->getArticle()->article_text

Template file you'll need to edit is as follows.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php


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.

11 years 6 months ago #212980 by dwaine
Thanks krileon,

in the tab.php file I replaced the line
.'<div class="articlesContent1">' . $row->getTitle( 0, $row->getArticle()->published ) . '</div>'

with

.'<div class="articlesContent1">' . $row->getArticle_text( 0,$row->getArticle()->published ) . '</div>'

and got the error:
Fatal error: Call to undefined method cbarticlesArticle::getArticle_text() in /home/content/81/7787381/html/expoTest2/components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php on line 24

do I need to define getArticle_text somewhere? I have attached a screenshot of the tab.php file.
Attachments:

Please Log in to join the conversation.

11 years 6 months ago #212982 by dwaine
krileon,

As usually happens to me after posting another question, I find the answer. Using your instructions EXACTLY rather than SORT OF, the method worked fine.

Thank you again.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 2.698 seconds

Facebook Twitter LinkedIn