Keyword

Show "Featured" Flag in tag listing

  • Fred heise
  • Fred heise's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111498 by Fred heise
Show "Featured" Flag in tag listing was created by Fred heise
Hi,

if i flag an article with "Featured" i can see the ../images/system/featuredItem.png in the category listing.

Is it possible to show this picture in the tag.php ?

Ive realised that the category_item.php is using this code to show the image:

<?php echo ($this->item->featured) ? ' catItemIsFeatured' : ''; ?>

Ive put this code into the tag.php, without success.

The featured flag is defined in the k2.css:


/* --- Featured flags: the classes are repeated further below to indicate placement in the CSS structure --- */
div.itemIsFeatured,
div.catItemIsFeatured,
div.tagItemIsFeatured,
div.userItemIsFeatured {background:url(../images/system/featuredItem.png) no-repeat 100% 0;margin:2px 0 0 0;}

I hope someone has an idea.

Thx a lot

mad

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111499 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Show "Featured" Flag in tag listing
Hello Fred,

For the tag override inside the items loop you should use $item-> instead of $this->item also instead of catItemIsFeatured I think tagItemIsFeatured is more appropriate.

I think that will do the trick.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Fred heise
  • Fred heise's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111500 by Fred heise
Replied by Fred heise on topic Re: Show "Featured" Flag in tag listing
Hi Krikor,

ive changed it, now it looks so:

<div id="k2Container" class="tagView<?php echo ($this->featured) ? ' tagItemIsFeatured' : ''; ?><?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">


Unfortunately its not working.

The start at the category_item.php looks so:

<div class="catItemView group<?php echo ucfirst($this->item->itemGroup); ?><?php echo ($this->item->featured) ? ' catItemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">



Do i have to change the classes, or do i have to define the " tagItemIsFeatured" in the k2.css. Like i said, the image is defined in the k2.css. I think, its a problem of the classes in the tag.php.

Hope you have another tip, thx

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


Powered by Kunena Forum