Results 1 to 6 of 6

Thread: Pull value, test and post gif in table cell

  1. #1
    Join Date
    Aug 2007
    Posts
    56

    Default Pull value, test and post gif in table cell

    Need a quick addon - to display an image next to the Listing Office Name.
    It needs to appear on both the searchresults page and the ListingView page.
    Basically pull the value off the Search page & Listing View pages - a code to test for the value in the Listing_Office_name. (don't worry about the names or the images I will adjust them when finished.)

    if Listing_Office_Name.value <> "MyBroker"
    then show image located in images/hs.gif
    else images/my.gif

    format will be
    <tr><td>{Listing_Office_Name}</td><td><the correct gif image></td>

    PM me with a quote and questions if you are interested.
    Thank you.

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Pull value, test and post gif in table cell

    If I really got what you want, you don't need an add-on.
    Try this... insert at your "search_result_X.html" and "listing_detail_X.html" template files this code:

    <tr>
    <td>{listing_field_Listing_Office_name_rawvalue} </td>
    <td><img src="{baseurl}/images/{listing_field_Listing_Office_name_rawvalue}_my.gi f" width="100" height="75" alt="{listing_field_Listing_Office_name_rawvalue}" /></td>
    </tr>
    If the field "Listing_Office_name" has no value, it will print "_my.gif".
    Otherwise, it will print the value of this field like: "fieldvalue_my.gif".

    Isn't it what you want?

    Eduardo.
    p.s.: at the above code are some extras "spaces" (blanks) that are being added by the forum app.

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  3. #3
    Join Date
    Jul 2003
    Location
    California
    Age
    41
    Posts
    4,229

    Default Re: Pull value, test and post gif in table cell

    This addon is completed for her now. That won't work as the field value is filled in regardless of the listing office name and is not blank if its not their office.

    So in order to do that they would need an image file named for every single brokerage that enters listings in their MLS. There could also be problems with this as some brokerages may have unsupported characters in their company names which would cause an image to not be displayed.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  4. #4
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Pull value, test and post gif in table cell

    Hi Mick!

    OK... I got what you mean.
    The way you explained that code will not work.

    Thanks,
    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  5. #5
    Join Date
    Jul 2003
    Location
    California
    Age
    41
    Posts
    4,229

    Default Re: Pull value, test and post gif in table cell

    yeah I had actually started out typing that exact reply to her original post in the general area but then thought about it for a second and realized she'll need crazy amounts of images that probably wouldn't always work so.. she'd need the addon, not a difficult or complex addon but an addon nonetheless.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  6. #6
    Join Date
    Aug 2007
    Posts
    56

    Default Re: Pull value, test and post gif in table cell

    Thanks to a GREAT Job completed by Mick!!

    Thank you!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •