Help - Search - Members - Calendar
Full Version: Hiding placeholder description information
User Forums > Ultimate Locator v1 - v2.5 Support > General Support
genero
Within our implementation of Ultimate locator, there are a couple placeholders that are not always populated (i.e. not all addresses have fax numbers). We'd like to have a description for each field but would also like the description to disappear if there is no value. For example, if there is a fax number, then the row should say "fax number: 987-654-3210" but if there isn't a fax, then nothing should appear. Is there a way of doing this easily without us having to append the text "fax number" to each entry within the fax field?
Brian
Hello,

Two Questions.

1. What version are you running? The code can be changed to support this.

2. Do you need this on the results_list or results_details page? Or both?
genero
We're running version 2.5.1 and need it for both the results_list and results_details page.
Brian
The locator already does this for the user fields. If the user field is empty, it will not print the field label or the value of the field.

I am attching a set of results_list.php and results_details.php files to this post. You can download these 2 files and upload them to your locator's root directory.

With the new files in place, you can put the following placeholders inside your results_list_format.htm and results_details_format.htm templates.

{telephonelable}
{faxlabel}
{emaillabel}
{websitelable}

Like this:

CODE
<tr>
   <td><font class="normal">{telephonelabel} {telephone}</font></td>
 </tr>


And it will print out like this if there is a value in the field:

Phone: 555-1212
Fax: 555-3434
Email: email@site.com
Web: www.site.com

It will print nothing if the field is empty.

These fiels are for v2.5 only

Hope this helps! Let me know if there are any problems with the new files.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.