OS Property support center

All properties have a class="featured" !

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago - 11 years 8 months ago #39880 by kalesh.suby
All properties have a class="featured" ! was created by kalesh.suby
Please see image below - All properties in OS property search result have a class="featured". Due to this, I am unable to give featured propertied a different color, highlights etc.



In my page above, only 1st property is featured.

Thanks
Last edit: 11 years 8 months ago by kalesh.suby.

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

More
11 years 8 months ago #39883 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: All properties have a class="featured" !
Hi,
Please use the Inspect Element tool of Mozilla Firefox, it will show the location of css file and you can change it easily
Thanks
Dam

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

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago - 11 years 8 months ago #39887 by kalesh.suby
Replied by kalesh.suby on topic Re: All properties have a class="featured" !
Hi Dam,

Please read my question fully. I also attached a picture in my last message and the post title is "ALL PROPERTIES HAVE A CLASS="FEATURED" !"

In my page above, only 1st property is featured.


Properties which are not featured also are getting class="featured". This is not a css issue its a code issue that is setting "featured" class to non featured properties".

Thanks
Last edit: 11 years 8 months ago by kalesh.suby.

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

More
11 years 8 months ago #39890 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: All properties have a class="featured" !
Hi Kalesh,
In old version, the listing of properties in file listing.html.tpl.php have 2 separator css class for normal and featured properties. But they weren't nice in different Joomla template. So we decided to combine 2 types of properties to one class name called "Featured". The different between normal and featured properties is the sub-div of <li>, with Featured properties, the subdiv shows
"<div class="featured_strip"><?php echo JText::_('OS_FEATURED')?></div>"
I don't think there is a problem with the css class name. I advise you to read the source code carefully before saying the code issue.
Dam

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

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago #39891 by kalesh.suby
Replied by kalesh.suby on topic Re: All properties have a class="featured" !
Hi Dam,

I know that the class featured_strip gives the property a little "Featured' Strip.

This will not help in highlighting the whole featured property with a different color etc. This is where the "Featured" css class is a must and should be given only for "Featured" property.

If there is no problem with the code, can you please advise how to change the styling of a featured property? You know I cant use the "Featured" class as you have used it for featured and non featured properties?

Thanks

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

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago - 11 years 8 months ago #39892 by kalesh.suby
Replied by kalesh.suby on topic Re: All properties have a class="featured" !
Hi Dam,

I just changed the php code in listng.html.tpl.php and now it works perfectly.

Change

<li class="featured">

to

<li class="featured <?php if($row->isFeatured == 1){ echo "highlighter";}?>">

As a result of this change, ONLY the featured property will have the class "highlighter included and it can be used to highlight the property.

<li class="featured highlighter">

If highlighting a property is possible without a code change, please let me know - It will be very helpful.

Below is the result - The featured property can be highlighted.

img546.imageshack.us/img546/1577/wn55.jpg

[img]http://http://img546.imageshack.us/img546/1577/wn55.jpg[/img]

Thanks
Last edit: 11 years 8 months ago by kalesh.suby.

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

Moderators: Dang Thuc DamNguyen Phu Quan