Get category title in the tags view

More
10 years 2 weeks ago #46497 by b2z
Hello!

Is it possible to get a category title along with the items title in the tags view? Looking through the code I did not find a proper way to do it. Of course I can get a category based on the item ID, but this will create one additional request per item which is not good for performance.

Dmitry

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

More
10 years 2 weeks ago #46509 by ggppdk
Hello

ok but you that you want to create a Joomla template override?
-- the category titles and a few other category tree stuff are alway available via a cached global object $globalcats:

make a Joomla template override of
components/com_flexicontent/views/tags/tmpl/default.php
copying it to
templates/joomla_template/html/com_flexicontent/tags/default.php

-- and inside the override you can use:

global $globalcats;
echo $globalcats[$item->catid]->title;



but may be you can avoid the override, although an override is not bad at this point, since you would want to customize tag view ... because of not having a template layout like category and items view


NOTE: v2.2.1
will render tags and favourites
via the category model/view/templates/
(old way will remain for compatibility)


now all other LISTING views already use the category model:
view=category
view=category && layout=mcats
view=category && layout=author
view=category && layout=myitems

thus our "category layout" of FLEXIcontent templates will be usable in all listing view
-- the DB model and templates are already prepared to support this behaviour


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.268 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline