Intégrer une position de module dans un template category.ph

More
13 years 6 months ago #26857 by Hableur
Bonjour,

je cherche à intégrer une position dans le fichier category.php.

La position in_page est crée dans le templateDetails.xml et fonctionne avec {loadposition in_page} dans un article standard.

Dans le fichier category.php, {loadposition in_page} ne fonctionne pas.
Code:
<jdoc:include type="modules" name="in_page" style="xhtml" />
non plus.

Quelqu'un a-t-il la soluce.

Merci

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

More
13 years 6 months ago #26859 by ggppdk
You could use a system plugin to do this.

System plugin can replace text everywhere:
e.g.
Modules Anywhere
extensions.joomla.org/extensions ... clude/6402


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

More
13 years 6 months ago #26876 by Hableur
Thanks ggppdk,

unfortunately, i tried to install Modules Anywhere, but it seems to have a problem in zip file.

I think i'll use javascript, it would be lighter...

A lot of sun in Crete ?

Here, in Bretagne, it's raining since weeks :cry:

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

More
13 years 6 months ago #26879 by ggppdk
Yes weather is too hot here 27-37 Celsius, and there only sun for months, no clouds ...

you can use some other load module System plugin, or trigger the loadposition Joomla 's Content plugin:
Code:
<?php $mobj = new stdClass(); $mobj->title = $this->item->title; $mobj->text = "{loadposition mypos_name}"; $mobj->slug = $this->item->slug; $mobj->sectionid = $this->item->sectionid; $mobj->catid = $this->item->catid; $mobj->catslug = $this->item->categoryslug; $mobj->id = $this->item->id; $mobj->state = $this->item->state; $dispatcher = &JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $limitstart = 0; if (!FLEXI_J16GE) { $results = $dispatcher->trigger('onPrepareContent', array (&$mobj, &$this->params, $limitstart)); } else { $results = $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$mobj, &$this->params, $limitstart)); } echo $mobj->text; ?>

Please note i have not tested the code above, so correct and also replace $this->item with e.g. any item variable you have available ... or maybe use empty strings '', and for parameters maybe create $myparams = new JParameter();

again i say i have not tested this code and you must correct it

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 review. Thanks!

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

More
13 years 6 months ago #26888 by micker
desoler je capte pas .. installe module anywhere (si tu a un soucis installe le par l'opion tmp de joomla) puis active ce plugin et autorise le pour la description dans la catégorie
apres tu pourras charger ton module sans avoir a faire de position ...
non ?

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.

More
13 years 6 months ago #26899 by Hableur
@ggppdk

Too much sun in Crete, a too much rain and coldness in France. What a pity !

I don't try your code because i don't understand what it is for.

Would it interprate "{loadposition mypos_name}" in the html code producted by category.php ?

Why using $this->item->title and so on (item->catid...) in category.php in template flexi ?

Thanks

@Micker

Bonjour Micker, tu es du coté ensoleillé, toi, veinard !

En ce qui concerne Modules Anywhere, je ne te cache pas que je rechigne à installer un plugin dont le fichier zip n'est pas fonctionnel. Si il ne l'est pas, qu'y-t-il comme autre anomalie ? C'est un site en production, je n'ai pas le droit à l'erreur.

D'autre part, installer un plugin rien que pour mettre mon module mod-search dans ma page flexi, je trouve ça lourd.

Enfin, la place de ce module n'est pas prévue dans la description de la catégorie, mais du côté de l'affichage des filtres.

A côté de ça, créer une position en display:none dans le template, y mettre mon module et transférer le contenu en jQuery dans une div produite par category.php me paraît bien simple.

Bien cordialement

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

More
13 years 6 months ago #26901 by ggppdk
mmm, it is strange that the modules anywhere does not work,

also if you would put the p, {loadposition pos_name} inside the category description, then it would work since content plugin are triggered inside category description since you can trigger content plugin there since v1.5.5 (there is a new global configuration parameter for this)

but what you suggested of moving HTML from one place to another via Javascript will also work.


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

More
13 years 6 months ago #26922 by micker
franchement je n'ai jamais eu aucun soucis ...
et entre mettre un plugin et recoder une page j'ai vite choisis ... ;)

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.

More
13 years 6 months ago #26924 by Hableur
@Miker
Ben, faire trois lignes de jQuery, c'est pas recoder.

Et puis mon but n'est pas de mettre le module dans la description de catégorie, or d'après ce que je comprends, Modules Anywhere (s'il veut bien s'installer) ferait cela, mais quid de placer le module entre la description et les filtres dans le html généré par le template ?

@ggppdk

I don't understand your sentence (my english is so poor):

"also if you would put the p, {loadposition pos_name} inside the category description, then it would work since content plugin are triggered inside category description since you can trigger content plugin there since v1.5.5 (there is a new global configuration parameter for this)"

I do not want put the module in category description, but in the template generate by flexicontent / template.

I think the best way is my jQuery idea, so simple. And after all, Modules Anywhere generate an error when installing, it isn't my fault :? !

Thanks a lot to both of you.

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

More
13 years 6 months ago #26927 by micker
si tu le mes dans la desciption de la category cela sera avant les filtres donc apres avec du css tu finis le placer simplement avec les suffix de module
tranquillement doucement ...
le load position c'est assez simple tu créer ta position dans to template joomla tu y mets ton module
apres avec le code donné par george tu peu charger le module qui est dans la position souhaiter
module anywhere est plus puissant car il peut charger un module non publier et charger un module sans position
franchement pour l'avoir déjà fais c'est la solution la plus simple ...
a+

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
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