iextensions wrote:you want to show description when view in Banner module?
I want to show Banner Description in the frontend. What I suposed to do is a Banner Carosel using just the Joomla Banner component. So, I need the Image (OK), Need Banner Title (Ok. Using override i can get it using $item->name;) and I need the description to put above the title.
The banner will link to an article, and i can add the link (ok).
Searching more deeply I found this code. I used it in my mod_banner override.
Code: Select all
/** Description from the Banner **/
$db = &JFactory::getDBO();
$bid = $item->id;
$sql = "SELECT `description` FROM `rlz1b_banners` WHERE '$bid'";
/*rlz1b_banners is your database name*/
$res = $db->loadAssocList();
<p><?php echo $res[description]; ?></p>
It worked fine, but I still don't get why this is not default in model... com_banners\models\banners.php
I can add 'a.description as description' in $jquery->select, but if i get an update, I'll lost the work.
This approach using override is the best, for sure.
Thanks for the reply!!