1
votes

I have a multilingual site, with some articles that do not have a menu item linking to them. They are connected to the rest of the site through links on other articles.

The problem I have is that I cannot select the articles without menu item to display the module. The solution suggested here seems somewhat complicated to do every time if you have lots of articles.

Since it is a bilingual site and I want the module to only show on the German or English pages, I though it might be possible to display one of the modules on all English pages and the other on all German pages?!

Another possibility would be to display it on all articles that are within a certain category, as I have a category for each language. Any suggestions as to how to do this?

2

2 Answers

0
votes

Try this,

Assign Module to all pages and set some module position according to language's like

custom_position_eng this stands for a module position for English 

and on the corresponding article pages you can load the module with calling like below.

{loadposition custom_position_eng}

This method will help you to show modules in article pages with out a menu related with it.Also it help to display different module on different languages etc.

If you have more article and position not work practically and you are also unable to assign to that module to a menu then try this,

You can load any module anywhere with following methods.

 $document = &JFactory::getDocument();
 $renderer = $document->loadRenderer('module');

 $Module = &JModuleHelper::getModule('mod_fmDataGrid');

 $Params = "param1=bruno\n\rparam2=chris";//This will only required when you pass module params through code
 $Module->params = $Params;
 echo $renderer->render($Module); 

So if you are using article layout with override concept try to edit the template and add the code with proper module names. else you have to edit Joomla core files with this (Its a bad idea editing core files not recommended).

Hope its helps..

2
votes

This is easily accomplished by using the free extension "advanced module manager": https://www.nonumber.nl/extensions/advancedmodulemanager

It allows you set set the assignment for that module using dozens of parameters including specific articles.