Category view: listing sub-category items and titles

More
12 years 9 months ago #28473 by Rooney
Hi,
I am using a category view to list all sub-category items, which is a cool feature that was missing two years ago. Is there a possibility to also display the sub-category category titles before the sub-category items list?

Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
12 years 9 months ago #28474 by ggppdk
The Faq template does this, it works well when all items is in a single page

but if you have pagination, then it may happen that items from same subcategory are split to multiple pages

so if you need pages , please test first,

i want to examine if we can make some change to the category model to allow FAQ and similar templates to overcome the above limitation


-- 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.

More
12 years 9 months ago #28476 by Rooney
I don't need pagination. I am using one single FC template (and I have to drop the name here, because she is the best designer I know and designed ONE FC template for us with all kind of views: Angie Radtke). It would be nice if I could just add the sub-category category title somewhere.

Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
12 years 9 months ago #28478 by ggppdk
Yes, you can make a single DB query to retrieve the category title for all your items, just a few questions

- you want the category title for the main category of the item? or all categories of items ?
- you want to make the subcategory title to be a link to the category
- you want to group together items from the same main category ?


-- 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.

More
12 years 9 months ago #28480 by Rooney
Here is a link: www.muenstermann.com/anwendungsb ... ehmen.html

The article "German Kiln Technology (GKT)" is in a sub-category of "Partnerunternehmen" I want to have the sub-category category title above the article(s). After the first subcategory with its items there will be a second and so on:

Category title
Category description

Sub-category 1 title
Sub-category 1 description
Item 1
Item 2
Item 3

Sub-category 2 title
Sub-category 2 description
Item 1
Item 2
Item 3

This would also be helpful for contact lists or a restaurant menu where you have one page with all subcategories including the items!

Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
12 years 9 months ago #28486 by ggppdk
To get the title of the main category of an item use:
Code:
$db = getDBO(); $main_catid = $item->catid; // OR $items[$i]->catid $query = "SELECT title FROM #__categories WHERE id =".$main_catid ; $db->setQuery($query); if ($db->getErrorNum()) echo $db->getErrorMsg(); $cat_title = $db->loadResult(); echo $cat_title;


-- 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.339 seconds
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
Save