[Solved] Count of 0 item and 0 category after category

More
12 years 10 months ago - 12 years 9 months ago #16889 by goum
From : category_subcategories.php
Code:
- [url=<?php echo JRoute::_( FlexicontentHelperRoute::getCategoryRoute($sub->slug) ); ?>]<?php echo $this->escape($sub->title); ?>[/url] <?php if ($this->params->get('show_itemcount', 1)) echo ' (' . ($sub->assigneditems != null ? $sub->assigneditems.'/'.$subsubcount : '0/'.$subsubcount) . ')'; $i++; if ($i != $n) : echo ', '; endif;
How modify the counter after the category ?
Because "$subsubcount" without category or "show_itemcount" wihtout item are not useful information.

I have also read :
www.flexicontent.org/forum/index ... =viewtopic
www.flexicontent.org/forum/index ... =viewtopic
Last edit: 12 years 9 months ago by goum.

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

More
12 years 9 months ago #16996 by ggppdk
Hello,

Can you be more detailed about what you want to do.

Regards


-- 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 #16998 by goum
Hello,
Thanks for you're answer.

Well, when you create a menu with a category, the presentation of the sub categories looks like this :

Subcategorie name (number of items/number of subcategories)

If there is no item :

Subcategorie name (0/number of subcategories)

If there is no sub-categories :

Subcategorie name (number of items/0)

Is it possible to remove these 0 ?
From categories if there is no subcategories and items if there is no item ?


With the other link, you will have something like this :
If there is no sub-categories :

Subcategorie name (number of "items")

If there is no item :

Subcategorie name (number of "subcategories")

With items and subcategories as words.

I hope I'm more clear :oops:
Thanks for your availability.

Best regards.

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

More
12 years 9 months ago #16999 by ggppdk
Hello,

In the file:
templates/yourtemplate/category_subcategories.php
replace line:
Code:
if ($this->params->get('show_itemcount', 1)) echo ' (' . ($sub->...
with:
Code:
if ($this->params->get('show_itemcount', 1)) { echo ' ('; if ($sub->assigneditems != null) echo $sub->assigneditems; if ($sub->assigneditems != null && $subsubcount) echo '/'; if ($subsubcount) echo $subsubcount; echo ')'; }
If you want you can append some text to the numbers:
Code:
... echo $sub->assigneditems ." ". JText::_( 'Items' ); ... ... echo $subsubcount ." ". JText::_( 'Categories' );

Regards


-- 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 #17000 by goum
Hello,
Wonderful ! thanks a lot I will try it soon !
Best regards !

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

More
12 years 9 months ago #17007 by micker
If its works edit your post title and add [solved]
Thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.318 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