 |

fnwadmin
Novice
Oct 5, 2007, 8:49 AM
Post #1 of 4
(1129 views)
Shortcut
|
|
Displayed Fields...
|
Can't Post
|
|
Is there a way to have different display templates depending on the type of listing? My client sells three types of vehicles (Trucks, Trailers, Heavy Equipment) Each type has their own specific set of fields, how do I create a display template that shows only the fields appropriate to that vehicle type.. Example: Type: Truck Make: Mack Year: 2001 Miles: 18,000 Type: Trailer Make: Featherlight Year: 1999 Length: 25ft Type: Equipment Make: Cat Year: 2000 Hours: 245 So if I list a Truck the LENGTH & HOURS fields would not apply and how do i hide those in my display template? Does this make sense?
|
|
|  |
 |

Ingrid
New User
Oct 5, 2007, 2:02 PM
Post #2 of 4
(1119 views)
Shortcut
|
|
Re: [fnwadmin] Displayed Fields...
[In reply to]
|
Can't Post
|
|
Hi fnwadmin, Thanks for your post. :) Here are the steps required to create individual search forms, search results, and listing pages that match the website they're being used on. In this example we'll create a new search form, search results, and listings page for trucks, however, you can use these same steps on any of your sub directory websites. The first step is to set up an individual search form for trucks. Here's how: 1. Go to your Listing Manager's search.cgi page through your web browser and view the source code. Once done, copy and paste the entire source code into a new HTML file with a text editor. 2. In the source code change the form field from this: <form method=get action="search.cgi"> to this <form method=get action="http://yourwebsite.com/cgi-bin/listman/exec/search.cgi"> (change the name to your actual website name and enter the correct path to your search.cgi) 3. You'll now want to save the search form you're creating as an HTML file. You can name the file after the website type. EXAMPLE: search_trucks.html Additionally, make any design changes to the new search page so it suits the look and feel of the overall vehicles website. 4. Once done, upload the search form (search_trucks.html ) to your vehicles website. You can upload it to wherever you're planning to have site visitors search for listings. Now that that is done, the next few steps will be used to create a search results page that matches the look and feel of the vehicles website. Here's how: 1. Download the _search_results.html template file to your website and open it up in an HTML/text editor of your choice. Modify this template file to suit the look and feel of the vehicles website. Once done, save this file as _search_results_trucks.html. 2. Upload the newly created _search_results_trucks.html template file to your /listman/templates directory (the same directory that you initially downloaded it form). 3. Now, open up your search_trucks.html search form (the one created in the previous steps) in an HTML/text editor of your choice and add the following hidden field tag just under the opening <form> tag: <input type="hidden" name="template" value="_search_results_trucks.html"> Passing this value will output search results using the _search_results_trucks.html template file. Once you've added the hidden field, save and you're done. So here's the very last step. Creating an entirely new _publish_listing.html template file so when viewing listings they'll be output with the same design as the vehicles website. 1. Download the _publish_listing.html template file to your website and open it up in an HTML/text editor of your choice. Modify this template file to suit the look and feel of the vehicles website. Once done, save this file as _publish_listing_trucks.html. 2. Upload the newly created _publish_listing_trucks.html template file to your /listman/templates directory (the same directory that you initially downloaded it from). 3. Now, open up your _search_results_trucks.html template file in an HTML/text editor of your choice. Change the following hyperlink in the _search_results_trucks.html template file from this: <a href="$listing_url$/$listing_file$"> To this: <a href="$search_url$?view=$listing_num$&template=_publish_listing_trucks.html"> You'll probably have to make this change in 6 places throughout the file. Making these changes ensures that all listings will be output using the design of the _publish_listing_trucks.html template file. Save and you're done. And that's it. I hope these steps help. If you have any other questions, please feel free to contact me. :) Regards, Ingrid Molloy - Product Specialist support@interactivetools.com
|
|
|  |
 |

fnwadmin
Novice
Oct 8, 2007, 11:27 AM
Post #3 of 4
(1106 views)
Shortcut
|
|
Re: [Ingrid] Displayed Fields...
[In reply to]
|
Can't Post
|
|
Does this mean I need to duplicate this same process for each category Trucks, Trailers, Equipment?
|
|
|  |
 |

Donna
Staff
/ Moderator

Oct 9, 2007, 3:33 PM
Post #4 of 4
(1100 views)
Shortcut
|
|
Re: [fnwadmin] Displayed Fields...
[In reply to]
|
Can't Post
|
|
Hi there, For each category that you'd like to have different fields, yes. :) Donna
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
|