Tuszu VIP
Total posts: 128
17 Oct 2013 18:35

I want to display couple of module only for specific subpages.

For example:

I want to display module with "My own HTML" only for homepage of Cobalt.

I want to display module with "Login" only for category called "Cars".

I try to do with External URLs, but it's not working.

How to do this?

Please, help me with this.

Last Modified: 02 Mar 2014


Konstantin
Total posts: 1,113
18 Oct 2013 01:47

I think you need use "Menu Assignment" in module options.


Sergey
Total posts: 13,748
18 Oct 2013 01:50

I want to display module with "Login" only for category called "Cars".

I want to display module with "Login" only for category called "Cars".

I want to display module with "My own HTML" only for homepage of Cobalt.

This is complicated question. To place module only in particular category, This category have to have separate Itemid. That would be easy to do by adding menu element directing to this category but then we have to check Itemid of this category every time we display link to any category. It means on the page with 100 categories we will have to run 100 SQL queries which is not cool.

Thus we have a choice. Performance over this feature. We had chosen performance. I suggest to change strategy.

But there is a trick around. You may create hidden menu element to section and set it in category parameter as category menu ID. Then only this category will have separate itemid and you will be able to set module for this menu ID. But note breadcrumbs and URLs will be broken as it is different menu element.

Another method is to add position to template. You can programmatically call login module in cobalt template.


Tuszu VIP
Total posts: 128
19 Oct 2013 20:09

Hmm... I'm not sure I understand, that I try to explain:

First method:

1) Go to New Menu Item and set to type menu as "Section Record List"

2) Next go to one of category of this section and set "Articles Itemid override" as menu created in first step

3) And it's done. The category from second step has different ItemID

Right?

Second method:

1) Create new position in current template of Joomla

2) And what next?

Please help me with this. :)


Sergey
Total posts: 13,748
21 Oct 2013 00:48

First method

2) No. you have to set menu ID (Itemid) target parameter. Parameter you mentioned will change item ID of the articles in that category not category link itself.

Second method.

You do not need to create any position in template

Just place this in any template

$modules =& JModuleHelper::getModules('customposition');

foreach ($modules as $module)

{

echo '<h3>'.$module->title.'</h3>';

echo JModuleHelper::renderModule($module);

}

and when you add modules add them to customposition. Because it is possible to add module to custom position.


pepperstreet VIP
Total posts: 3,837
21 Oct 2013 19:16

I want to display module with "My own HTML" only for homepage of Cobalt.

I want to display module with "Login" only for category called "Cars".

What do you mean by "homepage"? The main section page? Or the "user homepage" of a section?

In general, if there is no real MenuItem and ID available, and you want to show certain modules in this context... my first bet is:

A.) MetaMod - metamodpro.com

How-To concept, older but cool examples for ME Resources (predecessor of Cobalt)

Hence the explanations about none-collapsing module-positions: Pro version.

B.) AdvancedModuleManager - Nonumber.nl

Also has URL detection plus a lot more module management stuff. Maybe it adds too much, but certain options can be turned off in global options or are available in pro version.

Both come with similar, but also with unique options. Both are available in free and pro versions.

Free versions might be enough for your tasks.

For example:

Your locations can be distinguished by unique URL parts. i.e.

User homepage:

index.php?option=com_cobalt&view=records&section_id=1:MySectionName&user_id=99:MyUserName&view_what=created&Itemid=999

Certain category:

category -> index.php?option=com_cobalt&view=records&section_id=1:MySectionName&cat_id=13:MyCategory&Itemid=999

Worth a look and try!


Tuszu VIP
Total posts: 128
04 Nov 2013 22:49

Hi!

Both extensions are for free? Can you added something only in one page?

For example only for HomePage?

I want only add simple text only in first page with section. Can you advise me the best solution?


Sergey
Total posts: 13,748
04 Nov 2013 23:24

I want only add simple text only in first page with section. Can you advise me the best solution?

I have lost track. simple text in wher? Field? Module? What module or field?


Tuszu VIP
Total posts: 128
12 Nov 2013 16:11

Yep. I want to display module of the first page of current section. Only in first page.

So... If the module show on http://backup.najlepsze-obrazki.pl/ , than on subpages like http://backup.najlepsze-obrazki.pl/?start=10 I don't want to show this module.

Heh... I try to clarifying my request as good as I can.

I would be very glad for any help.


Sergey
Total posts: 13,748
13 Nov 2013 00:29

This is possible only if you place module position inside Cobalt template. It would be hard but possible to do with settings if you want module on one category and do not want on other category. But hidle module on page navigation is nearly impossible without custom coding.

Powered by Cobalt