Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Listings Manager (Realty Manager & Auto Manager):
Hide unused fields in detailed listing

 

 


thp
User

Jan 8, 2009, 5:02 AM

Post #1 of 10 (5875 views)
Shortcut
Hide unused fields in detailed listing Can't Post

I noticed in your Demo site, only selected fields are being shown under Summary Features for particular properties i.e. Near school. The default system appears to show all the fields, irrespective, if whether they have any values attached. Can you please confirm how to enable this feature.

Regards


Donna
Staff / Moderator


Jan 8, 2009, 2:53 PM

Post #2 of 10 (5868 views)
Shortcut
Re: [thp] Hide unused fields in detailed listing [In reply to] Can't Post

Hi there,

We tend to use a conditional Javascript like this:

<script type="text/javascript">
if ('$lfieldX_je$')
{
document.write("Fax: $lfieldX_je$");
}
</script>

This basically says "If there's something in lfieldX, display the label & the field."

Give that a try and let me know if it works for you. :)

Donna

--
support@interactivetools.com


thp
User

Jan 9, 2009, 1:29 AM

Post #3 of 10 (5858 views)
Shortcut
Re: [Donna] Hide unused fields in detailed listing [In reply to] Can't Post

Thanks, works a treat


thp
User

Jan 21, 2009, 5:39 AM

Post #4 of 10 (5571 views)
Shortcut
Re: [Donna] Hide unused fields in detailed listing [In reply to] Can't Post

Donna, I have used the code and it works great. However! In my _search_results page, I want the telephone number to be shown from one of two fields. If the property is a Private Sale (Created as a User), then against the property I have created a text field (lfield3)for a private telephone number. Therefore, in the seach results page, if this field has been entered, then it is to show the value. The system is processing this as it should with the following code;

<script type="text/javascript">
if ('$lfield3_je$')
{
document.write("Telephone $lfield3_je$");
}
</script>

However, If the property is being sold by an Agent, then I want the telephone number to be taken from the Agents Homepage details (in which case the telephone field in the Listing Editor will be blank). The telephone field is hfield5 in the Homepage Editor. Therefore, in the seach results page, if this field has been entered, then it is to show the value. Therefore, underneath the above javascript, I have inserted the following code;

<script type="text/javascript">
if ('$hfield5_je$')
{
document.write("Telephone $hfield5_je$");
}
</script>

The system is not displaying this field, even though, the field has an entry agianst it. I have tredble checked everything i.e. correct field numbers etc but can't seem to fathom it out. Any ideas would be much appreciated?


Donna
Staff / Moderator


Jan 23, 2009, 11:25 AM

Post #5 of 10 (5515 views)
Shortcut
Re: [thp] Hide unused fields in detailed listing [In reply to] Can't Post

Hi thp,

This actually has nothing to do with your javascript, just the type of field you're trying to use -- hfield placeholders don't work on the search results.

Take a look at this page in the documentation for which fields work on which templates:

http://www.interactivetools.com/docs/doc.cgi?/listingsmanager/doc_page6.html

I hope this helps. :)

Donna

--
support@interactivetools.com


thp
User

Jan 23, 2009, 12:22 PM

Post #6 of 10 (5513 views)
Shortcut
Re: [Donna] Hide unused fields in detailed listing [In reply to] Can't Post

Thanks. Shame though!


kaydii
Novice

Jan 26, 2009, 12:20 AM

Post #7 of 10 (5456 views)
Shortcut
Re: [Donna] Hide unused fields in detailed listing [In reply to] Can't Post


In Reply To
Hi there,

We tend to use a conditional Javascript like this:

<script type="text/javascript">
if ('$lfieldX_je$')
{
document.write("Fax: $lfieldX_je$");
}
</script>

This basically says "If there's something in lfieldX, display the label & the field."

Give that a try and let me know if it works for you. :)


Hi Donna, would you be able to explain this in simple terms. I don't really know what I'm doing but have managed to get Lightbox 2 working so a bit more detail would be great. Have not done anything with java script before except cut & paste Blush


Donna
Staff / Moderator


Jan 26, 2009, 4:51 PM

Post #8 of 10 (5442 views)
Shortcut
Re: [kaydii] Hide unused fields in detailed listing [In reply to] Can't Post

Hi there,

Well, there's really not much more to it! Copy & paste the code I gave exactly (replacing an existing $lfieldX$ field) and replace the "X" with the field number you're using... and that's it. :)

So, for example, if you wanted to do this with listing field #28, in which you wanted to display a "Color", you would have this:


Code
 
<script type="text/javascript">
if ('$lfield28_je$')
{
document.write("Color: $lfield28_je$");
}
</script>


Ta da! :)

Donna

--
support@interactivetools.com


kaydii
Novice

Jan 26, 2009, 5:05 PM

Post #9 of 10 (5440 views)
Shortcut
Re: [Donna] Hide unused fields in detailed listing [In reply to] Can't Post

Thanks Donna, So if I want to hide all unused fields, I have to do an individual script for each field that may or may not contain data?
And this all goes in the head section of the _publish_listings page or do I have to make a .js file and/or files and reference it/them from the page, like with the lightbox script?
Sorry for my lack of knowledge!


Donna
Staff / Moderator


Jan 26, 2009, 5:12 PM

Post #10 of 10 (5438 views)
Shortcut
Re: [kaydii] Hide unused fields in detailed listing [In reply to] Can't Post

Hi there,

Yup, for each field you'd have to just copy & paste this script in. Doesn't go in the header or a separate JS file, just copy & paste the entire thing wherever you want it to appear on your page. Replace the existing $lfieldX$ field with what you've copied & pasted from here. :)

Donna

--
support@interactivetools.com