Keyword

How to show module only on category view and not article view?

More
14 years 7 months ago #78684 by Trond
I want my website to have one blog with the following in place:Category: 1 column blog (small,300 pixels)Item view: 505 Pixels.I must be able to assign my ad modules to the category view but the ads must not be visible on item view.I'm used to assign the modules easily to the different menu items and disable them on the categories or other menu items that I do not want to display them. Is there a solid solution to prevent modules to show on the articles and only on categories, tag and user blog pages?

Oslo, Norway.

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

More
14 years 4 months ago #78685 by yaksushi
I have the same problem, I can't just assign modules to display on all but there is no way for me to get these modules to display on certain items like if a tag is clicked. Anyone found a solution to this?

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

More
14 years 4 months ago #78686 by esedic
Use Advanced Module Manager: extensions.joomla.org/extensions/administration/admin-structure/10307

It has a lot options, you can control publishing your modules also by K2 categories/items.

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

More
14 years 4 months ago #78687 by gg4u
hello Elvis

it is not enough, I am just trying it...

- I set up the front page of J to display items from K2 categories (using the "category" option when selecting from "Home" link, menu item type: "Categories" (k2)
- Some modules are to be displayed only in home page, other in all the navigation, everything on the right

Without touching options from the k2 category, wehn browsing in categories' items from the frontpage, NOmodules on the right are displayed.

Wehn option of the K2 cateogry set to fetch specific articles frmo specific categories,
when click on the categories'items ALL the modules modules are displayed ....

It looks like there is a problem with module assignment,.. i cannot tell to display when internal item of k2 categories are displayed..

Please any help.

Advanced Module manageer installed, but i got no results...

If it is too complicated, i am ready to go on skype an d show you the website.. please help, under pressure for the client :O

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

More
14 years 4 months ago #78688 by gg4u
It looks like that modules assignement cannot recognize what is "homepage" and what is not.

I also tried, as test, to include a K2_content module.
Also, when clicking an article, the article is displayed and also all the other modules, not regarding if they were assigned only to home page or not...



gg4u said:hello Elvis

it is not enough, I am just trying it...

- I set up the front page of J to display items from K2 categories (using the "category" option when selecting from "Home" link, menu item type: "Categories" (k2)
- Some modules are to be displayed only in home page, other in all the navigation, everything on the right

Without touching options from the k2 category, wehn browsing in categories' items from the frontpage, NOmodules on the right are displayed.

Wehn option of the K2 cateogry set to fetch specific articles frmo specific categories,
when click on the categories'items ALL the modules modules are displayed ....

It looks like there is a problem with module assignment,.. i cannot tell to display when internal item of k2 categories are displayed..

Please any help.

Advanced Module manageer installed, but i got no results...

If it is too complicated, i am ready to go on skype an d show you the website.. please help, under pressure for the client :O

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

More
14 years 4 months ago #78689 by gg4u
ok guys, it looks that modules cannot recognize their assignemtn when I select the option "Select categories" in Parameters (BAsic) of the Menu Item Type "Categories" (k2). You get this options when configuring "Home" link for homepage...

If I select any item, then I got the modules error of displaying ALL the modules on the right also in the internal pages (item pages), disregarding module assignment to be displayed only in homepage
If I don't touch anything, then NONE module is displayed in internal page..

WHAT IS THIS?!

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

More
13 years 11 months ago #78690 by Damian Gonzalez
Hey I had this same issue, I solved it by using the MetaMod extension available here: www.metamodpro.com/

When you add the module, go to the PHP section and use this "recipe":

if ($option == "com_content" and ($view == "category" or $view == "section") ) {
return "101,102";
}

Where 101 and 102 are the modules that you want to display only on the blog/list pages, and not the subsequent article pages.

Here are some other threads that will help with you making another recipe:
www.metamodpro.com/forums/topic?id=77
www.metamodpro.com/forums/topic?id=185

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

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 11 months ago #78691 by Yiota
One other way to control the module assignment whether you are in a category view or in an item view is the following.
On your index.php file (in your template) once you locate the module position you can make an if statement
$option = JRequest::getCmd( 'option' );
$view = JRequest::getCmd( 'view' );

if ($option==com_k2 && $view==itemlist) :

load this module position for the category view (or the tag view or the search)

else :

load another module position for the item pages

endif;

You can also play between the $task also and load another module for the tag or search.

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

More
13 years 3 months ago #78692 by Faris Nasir
I'm having the the same problem. This happens when a page is not assigned to any menu item, it'll display all modules in the article view.

 

I have an article slider in the front page, when I clicked the link in the slider, the article/item view would show the modules that are assigned to the front page.

 

SOLUTION (only for Gantry FW users)

 

I'm using a Gantry template. Under the template parameters in Template Manager, the last option of the Gantry FW allows you to assign these (unassigned) pages to a menu item. As I don't want any modules to appear in the article view, I assigned it to a menu item that doesn't contain any modules.

 

If you want other modules to appear in the article view, just create a menu item and assign the desired modules to the menu item. Then, back to the template parameters, assign the pages to the newly created menu item.

 

Voila, problems solved. But only for Gantry users, unfortunately. (I don't know how to overcome this problem if you're a non-Gantry user..sorry)

 

P/s: I found out that this is not just a problem of K2, but it also a problem of Joomla! articles. Perhaps this is what they called 'duplicate pages'. The duplicated pages doesn't have any menu item assigned. Maybe an SEF URL components can solve the issue as they can avoid duplicate pages (if i'm not mistaken)

 

I hope, this helps.

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

More
13 years 3 months ago #78693 by Dylan Humphreys
Did nobody see Damian Gonzalez's suggestion on Metamod? this is EXACTLY the sort of thing its designed for.

I use it on my site, and it works like a charm.

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


Powered by Kunena Forum