Hide mod_flexicontent when item list is empty

More
11 years 11 months ago #38128 by ggppdk
Hello,
you are welcome,

this issue (not so important issue) was open in our bug tracker already and we decide to fix after you reported it again (and we tested the fix)

but you do not mention, did you test it ?


-- 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 #38155 by Ibehem
Hello,
I just tested it. I installed the full version 2.0.3 beta3 r1694.

- Added a new Universal Content Module for FLEXIcontent.
- Item Scope: Include / Related Items fields + behaviour: Related Items
- Layout: Default

It works properly (with or without items)

Then, I check: Skip category if no items

The module is still displayed even when there are no items... So I guess, I am missing something else?

Thank you,

Eric

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

More
11 years 11 months ago #38156 by ggppdk
Hello,

Here is the criteria for skipping the inclusion of module template for 1 category (when applying configuration per category):
Code:
// Decide whether to skip rendering of the layout $can_skip_category = !$catdata || $params->get('skip_category_if_noitems', 0); if ( !$items_exist && $can_skip_category && !$params->get('display_favlist', 0) ) continue;

Maybe you have also enabled "Show Module Read More" parameter?

what is the exact HTML that you get from the module ?


-- 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 #38159 by Ibehem
Hello,

You mean the rendered html?

Here it is:
<div class="grid-box width100 grid-v"><div class="module mod-box deepest">
<h3 class="module-title">Autres fiches sur le sujet</h3>
</div></div>

My only Item criteria is based on related items.

I've made the following test. I added in the default.php of modules\mod_flexicontent\tmpl a
<?php // no direct access
defined('_JEXEC') or die('Restricted access');
echo "Hello";?>

And Hello is not rendered if there are no items, but well if there is one. So it seems it's working, but the 'empty' module is still rendered in Joomla. I mean, if I have a module with a title and a colored background, I have a empty colored rectangle with the title...

(I added some screenshot to explain my purpose)

Thank you again,

Eric
Attachments:

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

More
11 years 11 months ago #38161 by ggppdk
Hello,

The code that you provided shows that it is working ...
Code:
<div class="grid-box width100 grid-v"><div class="module mod-box deepest"> <h3 class="module-title">Autres fiches sur le sujet</h3> </div></div>

-- I only see the title,
-- I don't see any HTML of the Universal Content Module in there.

so either: disable the module title or use "Hide if Empty" option of Advanced Module Manager


-- 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 #38167 by Ibehem
I'm using yootheme template, and the problem came from there (even with the advanced module)...

I found a solution, so everything works fine!

Thank you again for your time and this great product!

Eric

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

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