Hide mod_flexicontent when item list is empty

More
12 years 1 day ago #37849 by Ibehem
Hello,

How can I hide a mod_flexicontent when the item list is empty? Should I write a PHP rule code? What should be its content?

Best Regards,

Eric

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

More
12 years 1 day ago #37859 by ggppdk
Hello,
this was reported before, and is marked as an enhancement in our bug tracker,

-- the templates do not check if they were given zero items, so try this:

Edit the template file e.g. tmpl/news.php, and just after:
Code:
defined('_JEXEC') or die('Restricted access');
try adding:
Code:
$items_exist = false; foreach ($ordering as $ord) { if ( !empty($list[$ord]['featured']) || !empty($list[$ord]['standard']) ) { $items_exist = true; break; } } if ( !$items_exist ) return;

i will test this when i get more time for v2.0.3

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
11 years 11 months ago #37894 by ggppdk
Hello,

implemented / fixed in r1690

NOTE: in the case that you display category information too, a new parameter was added which you should enable:

Skip category if no items
Enable this to skip printing category information when no items are listed for the category

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
11 years 11 months ago #38108 by Ibehem
I'm not sure I was totally clear in my question.

I'd like to totally hide the Mod_Flexicontent and not only its content.

I didn't found a way to use the PHP Expression Rule.

Event when I modify the tmpl/default.php and add directly a return; I got the empty module but it is still displayed.

Thank you again for your help!

Eric

PS: Btw, where can we find the version r1690?

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

More
11 years 11 months ago #38109 by ggppdk
Hello,
the above is incomplete more changes were needed and were made in r1690+

-- if you want you can try to grab current Universal content module from SVN try using it with v2.0.3beta2 or v2.0.2 (first, backup previous module folder)

otherwise please wait for v2.0.3


-- 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
11 years 11 months ago #38123 by Ibehem
Thank you very much for your help! :D

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

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