Hiding / Showing Flexicontent - Unversal Module

More
8 years 4 months ago #63018 by randonneur
I enabled the "universal content" filter module with an expert. It shows a section according to a date in the CID 12. I want to hide the module when no item meets the condition of the filter expert.
In the configuration show / hide, I copied the code according to the FAQ :
www.flexicontent.org/documentation/faq/7...content-modules.html
Parameter: Combines rules: AND - Parameter: Show in views: none
-
return (
JRequest :: getCmd ('option') == 'com_flexicontent'
&& In_array (JRequest :: getCmd ('view'), array ( 'item', 'items'))
&& In_array (JRequest :: getInt ( 'cid'), array (12))
);
-
The module no longer appears at all, even if an item exists under the expert filter.
Does anyone ever used this tool "Hiding / Showing FLEXIcontent modules" ?
Thank you to the FLEXIcontent team for this great development.

J'ai activé le module "universal content" avec un filtrage expert. Il affiche un article selon une date dans la catégorie 12. Je veux cacher le module quand aucun article ne répond à la condition du filtre expert.
Dans la configuration afficher/masquer, j'ai copié le code selon la FAQ
www.flexicontent.org/documentation/faq/7...content-modules.html
Parameter: Combine rules: AND - Parameter: Show in views: none
--
return (
JRequest::getCmd( 'option' ) == 'com_flexicontent'
&& in_array(JRequest::getCmd( 'view' ), array('item','items'))
&& in_array(JRequest::getInt( 'cid' ), array(12))
);
--
Le module ne s'affiche plus du tout, même si un article existe selon le filtre expert..
Est-ce que quelqu'un a déjà utilisé cette fonction "Hiding / Showing FLEXIcontent modules" ?
Merci à toute l'équipe de flexicontent pour ce développement génial.

Pierre A. Martin
community & web project manager diplômé
Valais (CH)

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

More
8 years 3 months ago - 8 years 3 months ago #63068 by ggppdk
If you want to show in category view of category with ID: 12
then it should be
Code:
return ( JRequest::getCmd( 'option' ) == 'com_flexicontent' && in_array(JRequest::getCmd( 'view' ), array('category')) && in_array(JRequest::getInt( 'cid' ), array(12)) );


-- 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...
Last edit: 8 years 3 months ago by ggppdk.

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

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