1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New Listings Customization

Discussion in 'Templates, HTML, CSS, and Design Help' started by jevanedwards, Aug 29, 2012.

  1. jevanedwards New Member

    This is an easy question, but I can not seem to find the answer. In my new 'listings module', I have the 'entry title' in one column, and 'price' in the other. How can I change the 'price' to the image that the user has uploaded? I have read through the documentation about the module, but I don't think that it was mentioned. Thanks in advance, and sorry if this has been dealt with.
  2. Mike-N-Tosh Owner

    I'm not sure that I'm understanding what you are referring to when you mention "New listings module" as there is no such module that I'm aware of. Are you referring to New listings link in the footer? If so, that is actually a predefined search which uses either the showlistings or showlistings2 template files as defined in your admin. Bear in mind, that if you make changes to those templates it will be reflected in ALL search results (e.g. "Top Listings", "New Listings", "Featured Listings" and any search done from either the quick search at the top of your pages or the advanced search page as well).

    If you want to change this as you mentioned then the showlistings.tpl (default) or the showlistings2.tpl files are in your template folder. If you are using any other template other than the default and they are not there, copy them from the default template folder to your current template folder.
  3. freeze2 Super Moderator

    I'm not sure if this relates to your question, but this is a sample of what I did on the home/index page of one of my sites using the Listings Plugin.

    The following gave me the latest 5 listings that have been posted, including the image.

    Code:
    <div id="style1">
        {listings limit="5" featured="N" sort_column="dateadded" assign="new_listings"}
        {foreach from=$new_listings item="entry"}
        <div class="style2">
            <div class="style3">
                <a href="{$entry.link}">
                <img src="{$entry.image}" alt="{$entry.title}" title="{$entry.title}" /></a></div>
            <div class="style4">
                <div class="style5">
                    <a href="{$entry.link}" title="{$entry.title}">{$entry.title}</a></div>
                <div class="style6">
                    <p>{$entry.description|truncate:140}</p></div>
            </div>
            <div class="style7">
                <div class="style8">
                {if $entry.price == '$0'} Price NA {else} {$entry.price}{/if}</div>
            </div>
        </div>
        {/foreach}
    </div>
    Of course, the styling would be up to you, but it may be something that you can work with.
  4. jevanedwards New Member

    Thank you both, what I meant was the 'new listings plug in'.

    I used the above code, and it's exactly what I wanted. I've made some minor customizations, but I can't figure out how to put a border around the individual ads. Can you advise? Thanks again.
  5. Mike-N-Tosh Owner

    In using the above code, you would need to add the border declaration to the style2 class.

    .style2 {
    padding: 5px;
    border: thin solid blue;
    }
  6. jevanedwards New Member

    Thanks, worked like a charm.

Share This Page