No intro or full text in selcted favorites

1 month 2 weeks ago #1 by MIrko
Hello, I am using a module to add an article to favourite, but, in the favourite list, doesn't see intro or full text of the article, only image and title.
Is it possible to see intro or full text in Favorite list?
Thx

Please Log in or Create an account to join the conversation.

1 month 1 week ago - 1 month 1 week ago #2 by Christopher Mavros
Hi again Mirko.
All parts of MyShortlist are customizable.

If you want to show more details in each item, you need to create a template override of the item php file in your template.
Copy the file
modules/mod_myshortlist/tmpl/default_item.php
to
templates/your_template/html/mod_myshortlist/default_item.php
Then, edit the file in your template directory as much as you want.

To load the intro text and the full text, you may have to write something like the following, in line 14, after the usual Joomla check:
defined( '_JEXEC' ) or die( 'Restricted access' );

$db = JFactory::getDBO();
$db->setQuery('SELECT `introtext`, `fulltext` FROM `#__content` WHERE `id` = "'.$item->object->id.'"');
$texts = $db->loadObject();

Then, print each text by writing
$texts->introtext
or
$texts->fulltext

Thanks again!

Christopher Mavros
mavrosxristoforos@gmail.com
Serving the Joomla! community with extensions since 2008.

Please Log in or Create an account to join the conversation.

1 month 1 week ago #3 by MIrko
Thx.
Sorry for my ignorance but where to add
$texts->introtext
or
$texts->fulltext

Please Log in or Create an account to join the conversation.

4 weeks 2 days ago #4 by Christopher Mavros
Sorry for the late reaction. Too many things to do here.
You can show any of those texts at the place you want them to appear, by writing:
<?php print $texts->introtext; ?>

That is the PHP code to print the text you want. Place it wherever you want in the file I mentioned eariler.
Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
Serving the Joomla! community with extensions since 2008.

Please Log in or Create an account to join the conversation.

4 weeks 2 days ago #5 by MIrko
Thank you It is working
Please is it possible, in mobile view, to show article like the image on the left and text on the right?
To have like this https://nimb.ws/2j3xsZ
Thx

Please Log in or Create an account to join the conversation.

4 weeks 1 day ago #6 by Christopher Mavros
This is something to be done with CSS in your template or in the PHP file I mentioned earlier.
Unfortunately, it is out of the scope of MyShortlist support, as it is a customization on how MyShortlist looks on your site.
However, what you need to do is probably just add something like:
.myshortlist_item_image { float: left; width: 50%; }

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
Serving the Joomla! community with extensions since 2008.

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros