Hiding / Showing Flexicontent - Unversal Module

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

2 years 2 months ago - 2 years 2 months ago #63068 by ggppdk
If you want to show in category view of category with ID: 12
then it should be
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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.