Keyword

Remove Featured Items ONLY from the Item view ?

  • Chamira
  • Chamira's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #118678 by Chamira
I am using the the Joomla menu to display the featured items from two child-categories at the top of a main Category view page.

This is working very well.

However, I would like to remove the Featured Items bar/ribbon from the individual Item view BUT keep it on the K2 Category view

Is this possible?

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 1 week ago #118679 by Yiota
You can remove it through CSS. The class that contains the icon is

div.itemIsFeatured for the item,
div.catItemIsFeatured for the category listing,
div.userItemIsFeatured for the user listing.

Just add a declaration through your template css
div.itemIsFeatured {background:none;}

or remove the specific class through k2.css if you have it in your template folder.

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

  • Chamira
  • Chamira's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago #118680 by Chamira
Hello Yiota,

Thank you for the reply.

I want to remove the actual list of featured items appearing on the individual item view.

If you look at the page: www.blueventures.org/newsroom/in-the-media.html

There is a list of Featured Items at the top of the page - This is the K2 Category view.

What I want to do is to remove the list of Featured Items from the Individual Item display, for example, if you click on the first item on the page (below the list of Featured Items):

www.blueventures.org/news-room-bv-in-the-media/oxfam-policy-and-practice-blog-marine-conservation-and-public-health-%E2%80%93-a-lesson-in-integration-from-madagascar-by-bob-dewar.html

The Featured Item list is appearing there as well.

What do I need to do to remove it from those pages?

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 1 week ago #118681 by Yiota
This seems to be a module published in the above-content position.
You can either check if this page is an item or not and then load the module position through your index.php of your template (see here similar post: getk2.org/community/New-to-K2-Ask-here-first/182475-Re-Different-modules-for-K2-items-layout)
or you can install the advanced module manager (www.nonumber.nl/extensions/advancedmodulemanager#download) which gives you the option of targeting exactly where to load the module.

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

  • Chamira
  • Chamira's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #118682 by Chamira
Hello Yiota,

Are you answering the right post?

I have two posts - one to do with the Featured Item list and another to do with a Custom HTML module.

Your above reply seems to be dealing with modules so I think it may be you are referring to my Custom HTML module post.

The Featured Items are not a module, I think.

Please clarify.

If you look at this screen-shot the Featured Items are outlined in red. joxi.ru/UKdKUtg5CbAdJodWfVc

I have set the menu item to display this category with featured items.

What I want is to have this Featured Items list ONLY in the Category View page, and NOT in any of the related Item View page.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 1 week ago #118683 by Yiota
The block which you have outlined is a K2 Content module published in the above-content position.

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

  • Chamira
  • Chamira's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #118684 by Chamira
Thank you for your patience, you are right this is a K2 Module - I did not realise this.

I am a complete K2 novice.

I have implemented the 'item' checking code that you had suggested in the linked post.

What would be the code if I want to make sure that the K2 module is not appearing ONLY on certain Item view content?

Can I check against the module 'title' or it's 'id' rather than just its position?

Because currently for ALL Item views I am disabling all the 'above-content' modules.

This is getting a little in to Joomla development but I would appreciate your help.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 1 week ago #118685 by Yiota
Hello,

As I told you earlier you have two options on how you want to target your issue.
1) You can either check if this page is an item or not and then load the module position through your index.php of your template (see here similar post: getk2.org/community/New-to-K2-Ask-here-f...-for-K2-items-layout)

2) you can install the advanced module manager (www.nonumber.nl/extensions/advancedmodulemanager#download) which gives you the option of targeting exactly where to load the module.

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

  • Chamira
  • Chamira's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #118686 by Chamira
Thank you for your continuing help.

I did understand you and I implemented the first option and it works.

I was just wondering what the code would be to check for and prevent only a specific module from appearing on an Item view using the module ID.

Using your module position code removes all modules in that position from Item view across the site. I may need to display some modules in that position for other content Item views.

So in partial-pseudo code it would be:

<?php if($this->countModules('above-content') && [check it is NOT a specific module ID]): ?>

Would that be possible?

I am trying to avoid using the Advanced Module Manager because of it overhead and also I think what I am suggesting may only be achieved using the commercial version.

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


Powered by Kunena Forum