Icon for Featured Listings

Discussion in 'Templates, HTML, CSS, and Design Help' started by arivederchi, Jun 15, 2010.

  1. arivederchi Customer

    Hello gang!

    In the category listings, I'm trying to get an image to show up in front of the title when it's a Featured Ad. Maybe like a little star or something. I feel this will be easier for users to understand the difference between Featured and Non Featured. The highlighting alone can be a little confusing. I scoured the forum for information on doing this and basically found one thread with outdated information. Any clues to make this happen will be greatly appreciated.

    Thanks!
  2. seymourjames All Hands On Deck

    Test if the advert is featured in the showlistings file and then place you image. Modify this line to include a test

    <td{if $entry.class<>""} class="{$entry.class}"{/if}><a href="{$entry.link}" title="{$entry.title}">{$entry.title}</a></td>

    Use debug to find the variable to test.
  3. arivederchi Customer

    Thanks for the reply David!

    I found this which I believe is the variable I need:

    {if $entry.featured =="Y"}Put image here!{/if}

    But I haven't been able to figure out where to put it.

    Here's what I thought would work but it shows up on all the listings not just the featured ones.

    <td{if $entry.class<>""} class="{$entry.class}"{/if}>{if $entry.featured =="Y"}Put image here!{/if}<a href="{$entry.link}" title="{$entry.title}">{$entry.title}</a></td>

    Could you tell me what I'm doing wrong.

    Thanks
  4. Mike-N-Tosh Owner

    Where did you get that variable from? Don't see any variable anywhere for that?

    I think what you're after is $results.featured=="Y"
  5. arivederchi Customer

    Thanks Mike for helping me out!

    I tried your suggestion but nothing shows up on the Featured listings. Am I putting the variable in the right place? Below is what I did.

    Thanks


    <td{if $entry.class<>""} class="{$entry.class}"{/if}>{if $results.featured=="Y"}Image Here{/if}<a href="{$entry.link}" title="{$entry.title}">{$entry.title}</a></td>
  6. seymourjames All Hands On Deck

    If you just use this

    {$entry.featured}

    you will see it displays a Y or N.

    It is certainly this. You have put quotes round the "Y" and they are not needed.

    {if $entry.featured == Y}Image Here{/if}
  7. arivederchi Customer

    That worked David! Once again, thank you so much for your help!

Share This Page