- Posts: 15
COMMUNITY FORUM
Featured item title colour
- Miss Rant A Lot
- Topic Author
- Offline
- New Member
Less
More
7 years 5 months ago #162411
by Miss Rant A Lot
Featured item title colour was created by Miss Rant A Lot
Hello. I have tried but to no avail to change the colour of the title when the item is featured.
Could you please point me in the right direction?
Thanks
Could you please point me in the right direction?
Thanks
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 5 months ago #162423
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Featured item title colour
Hello,
Using the $item->featured flag (or $this->item...) you can print an extra CSS class and have a new colour as a property.
Using the $item->featured flag (or $this->item...) you can print an extra CSS class and have a new colour as a property.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Miss Rant A Lot
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
7 years 5 months ago #162429
by Miss Rant A Lot
Replied by Miss Rant A Lot on topic Featured item title colour
I have tried two ways:
<div class="customfeaturedtitle">
<?php if($this->item->params->get('catItemTitle') && $this->item->featured): ?>
</div>
<?php endif; ?>
and
<?php if($this->item->params->get('catItemTitle') && $this->item->featured): ?>
<!-- Item title Featured-->
<h3 class="catItemTitleFeatured">
<?php endif; ?>
and both ways I only manage to change the featured notice not the actual title :(
<div class="customfeaturedtitle">
<?php if($this->item->params->get('catItemTitle') && $this->item->featured): ?>
</div>
<?php endif; ?>
and
<?php if($this->item->params->get('catItemTitle') && $this->item->featured): ?>
<!-- Item title Featured-->
<h3 class="catItemTitleFeatured">
<?php endif; ?>
and both ways I only manage to change the featured notice not the actual title :(
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 5 months ago #162439
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Featured item title colour
I think this snippet will help you :)
You only need one check in order to print an extra class.
You only need one check in order to print an extra class.
<?php if($this->item->params->get('catItemTitle')): ?>
<!-- Item title ->
<h3 class="catItemTitle<?php if($this->item->featured) echo ' catItemTitleFeatured'; ?>">
...
...
...
</h3>
<?php endif; ?>
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Miss Rant A Lot
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
7 years 5 months ago #162449
by Miss Rant A Lot
Replied by Miss Rant A Lot on topic Featured item title colour
Thanks
The only thing that changes is the featured text by the title...
This is in my K2.CSS
div.catItemHeader h3.catItemTitle{font-size:24px;font-weight:normal;line-height:110%;padding:0px 0 4px 0;margin:0;}
div.catItemHeader h3.catItemTitle span{}
div.catItemHeader h3.catItemTitle span sup{font-size:12px;color:#CF1919;text-decoration:none;}
tHE BELOW ARE THE ONES I ADDED
div.catItemHeader h3.catItemTitleFeatured{color:#ddd;text-decoration:none;font-size:24px;font-weight:normal;line-height:110%;padding:10px 0 4px 0;margin:0;}
div.catItemHeader h3.catItemTitleFeatured span{}
div.catItemHeader h3.catItemTitleFeatured span sup{font-size:16px;color:#000000;text-decoration:none;}
and this css....div.catItemHeader h3.catItemTitleFeatured span sup{font-size:16px;color:#000000;text-decoration:none;} is the one that's changing the featured text under the title
The only thing that changes is the featured text by the title...
This is in my K2.CSS
div.catItemHeader h3.catItemTitle{font-size:24px;font-weight:normal;line-height:110%;padding:0px 0 4px 0;margin:0;}
div.catItemHeader h3.catItemTitle span{}
div.catItemHeader h3.catItemTitle span sup{font-size:12px;color:#CF1919;text-decoration:none;}
tHE BELOW ARE THE ONES I ADDED
div.catItemHeader h3.catItemTitleFeatured{color:#ddd;text-decoration:none;font-size:24px;font-weight:normal;line-height:110%;padding:10px 0 4px 0;margin:0;}
div.catItemHeader h3.catItemTitleFeatured span{}
div.catItemHeader h3.catItemTitleFeatured span sup{font-size:16px;color:#000000;text-decoration:none;}
and this css....div.catItemHeader h3.catItemTitleFeatured span sup{font-size:16px;color:#000000;text-decoration:none;} is the one that's changing the featured text under the title
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 5 months ago #162459
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Featured item title colour
Can you send me a link to the issue?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Miss Rant A Lot
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
7 years 5 months ago - 7 years 5 months ago #162474
by Miss Rant A Lot
Replied by Miss Rant A Lot on topic Featured item title colour
www.dailydealsblog.co.uk/itemlist?start=90 (this link has mixed featured and unfeatured)
Where Featured = Expired
I'm thinking it's because the title is linked so there's this in the code:
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
Which is why it's staying red as that's the linked title css
So need to find a way to change that code so that if it's featured it's a different css
Thank you
Where Featured = Expired
I'm thinking it's because the title is linked so there's this in the code:
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
Which is why it's staying red as that's the linked title css
So need to find a way to change that code so that if it's featured it's a different css
Thank you
Last edit: 7 years 5 months ago by Miss Rant A Lot.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 5 months ago #162481
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Featured item title colour
This CSS snippet will assist you.
div.catItemHeader h3.catItemTitleFeatured a {
color: #000;
}
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Miss Rant A Lot
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
7 years 5 months ago #162484
by Miss Rant A Lot
Replied by Miss Rant A Lot on topic Featured item title colour
Oh dear, that is embarrassing! So simple :/
Thank you very much (again) for your help.
Claire
Thank you very much (again) for your help.
Claire
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 5 months ago #162487
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Featured item title colour
You 're welcome Claire :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.