Keyword

mod_k2_content featured items

  • Kelsey Brookes
  • Kelsey Brookes's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 1 month ago #72200 by Kelsey Brookes
mod_k2_content featured items was created by Kelsey Brookes
I'm looking for a way to tag links in the content module as featured items. I want to do this because on the front page of the site I do not want show links of featured items as those items will be on the front page in another format.

On content pages however I want to be able to show the featured item links and also highlight them as features.

I tried taking the code that shows the featured item notice from the category item code, but unfortunately it just killed the site when used in the module.

Any advice?

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

  • Kelsey Brookes
  • Kelsey Brookes's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 1 month ago #72201 by Kelsey Brookes
Replied by Kelsey Brookes on topic mod_k2_content featured items
Nothing? My alternative is to install MetaMod and replicate each module. It's workable, but clumsy.

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

More
11 years 2 months ago - 11 years 2 months ago #72202 by TOTHOMweb
Replied by TOTHOMweb on topic Re: mod_k2_content featured items
Hope that after 3 years you solved it. Just in case anyone needs it again... ;)

you can create your own template (copying the folder <joomla>/modules/mod_k2_content/tmpl/Default to <joomla>/modules/mod_k2_content/tmpl/<your_template>) and then editing the file default.php.

There you can add a condition to know if a item is featured by adding:
<li class="<?php echo ($key%2) ? "odd" : "even"; if(count($items)==$key+1) echo ' lastItem'; if($item->featured) echo ' featured' ?>">

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


Powered by Kunena Forum