Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Listings Manager (Realty Manager & Auto Manager):
Using More Than One Template

 

 


rlindauer
User

May 25, 2009, 9:01 PM

Post #1 of 12 (10653 views)
Shortcut
Using More Than One Template Can't Post

My current Real Estate install is www.rossrealtycentralcity.com. I have customized the templates and all seems to be fine. However, my client now wants to use the existing template for the "regular" real estate listings and a separate, scaled-down template for the lots (since they don't need the room sizes, bedroom, baths, etc). The template I created is here: http://www.rossrealtycentralcity.com/listman/templates/_realty/_publish_lot.html

How do I create the proper links so that only "lots" get singled out to use the special template and the rest use the existing one as they are now?

I'd appreciate your help!
Thanks in advance!

Robin
robin@webtechsolutions.net


rlindauer
User

May 27, 2009, 1:34 PM

Post #2 of 12 (10522 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Has anyone tried before to use a different template for each "category" in the listings? Do I manage this all from the URL?


Donna
Staff / Moderator


May 27, 2009, 4:07 PM

Post #3 of 12 (10506 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Hi there,

Yep, exactly -- you would specify the link to "Lots" be like this:

http://yoursite.com/path/to/search.cgi?search=1&template=_publish_lot.html&lfieldX_keyword=Lot

...replacing "lfieldX" with the listing field number that saves your category name. For example, if you saved the listing type in listing field 12, you'd have:

http://yoursite.com/path/to/search.cgi?search=1&template=_publish_lot.html&lfield12_keyword=Lot

If you have a page for searching lots, you could also put the search result template into the search query template, like this:

<input type="hidden" name="template" value="_publish_lot.html">

I hope this helps! Let me know if you have any other questions or concerns. : )

Donna

--
support@interactivetools.com


rlindauer
User

May 27, 2009, 7:00 PM

Post #4 of 12 (10495 views)
Shortcut
Re: [Donna] Using More Than One Template [In reply to] Can't Post

Okay, that helps to see the entire link, but here's my problem. I have a page that displays acreages, farms AND lots together. From that search results page, a user can then click to view the printable listing sheet (or detailed listing with more information) Is there a way to say "if it's a lot THEN use the template called _publish_lot.html ?

I set up a separate printable template that was scaled down to take off unnecessary graphics for print purposes, but can I somehow tell it to use a separate template for lots versus everything else? Instead of just removing the graphics, I also want to take off bedrooms, baths, sq ft, year built, etc for the lots because there is no building present.

In effect, what I want to do is set up two different scenarios -- similar to the default template where it has one layout for listings WITH a photo and then a separate bit of html for listings that do NOT have a photo. Only I want to say "if it's a lot, then use template _publish_lot.html - if not, use the regular template".

If that doesn't work, then it looks like I'd have to separate lots and have a page JUST for displaying those (separate from farms and acreages) in order to use the new template, correct?


rlindauer
User

Jun 1, 2009, 5:48 AM

Post #5 of 12 (10275 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Is that my only option? To separate out each "category" on its own page instead of listing them together? So then acreages, farms, and lots would all have their own page and could each have their own template?


Donna
Staff / Moderator


Jun 3, 2009, 4:46 PM

Post #6 of 12 (10135 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Hi there,

The other option is that you could use conditional javascript statements to do something of an "if... then..." setup. So, "If this property is a lot, display this information." Would something like that work?

Donna

--
support@interactivetools.com


rlindauer
User

Jun 3, 2009, 6:05 PM

Post #7 of 12 (10129 views)
Shortcut
Re: [Donna] Using More Than One Template [In reply to] Can't Post

Yes, that's exactly what I would *like* to do, but I don't know if I'm well-versed enough in javascript to write the necessary code. If someone else reads this and can offer me a start, that would be great! Otherwise I'll have to go with the previous option. Thanks for your help.


Donna
Staff / Moderator


Jun 5, 2009, 3:09 PM

Post #8 of 12 (9994 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Hi there!

Take a look at this thread for some details about how to setup a conditional javascript:

http://www.interactivetools.com/forum/gforum.cgi?post=69387#69387

I hope this helps. :)

Donna

--
support@interactivetools.com


rlindauer
User

Jul 15, 2009, 2:28 PM

Post #9 of 12 (9563 views)
Shortcut
Re: [Donna] Using More Than One Template [In reply to] Can't Post

Donna:

I thought I had this figured out, but I ran into a couple snags, and I'm stuck! Hopefully I can explain it and you can help me out!

Okay, we are trying to use the alternate template to display Commercial Listings (instead of Lots as mentioned in my previous posts). Here is my template:
http://www.rossrealtycentralcity.com/listman/templates/_realty/_publish_commercial.html

First of all, I have an issue with the following tag:
<!-- templatecell : row_image -->

I used this one: <!-- templatecell : image -->in my publish_listing template, but in my new publish_commercial listing, it returns an error saying templatecell: row_image is not defined.

So I'm not sure when to use row_image and when not to. It's clear that I need it on the publish_commercial template, but perhaps I didn't put it in the right place or did something else wrong because now I get the following page:
http://www.rossrealtycentralcity.com/listman/exec/search.cgi?search=1&perpage=10&lfield7_keyword=Commercial+Property&template=_publish_commercial.html

Even with 5 commercial listings, none of them are showing up on the above page.

So - do I need BOTH of the following?? I've tried it with one and with both with no luck.

<!-- templatecell : row_noimage -->
<!--templatecell: no_images -->

Second question - sorry this is a loaded one!

The commercial listings show up just fine on this page:
http://www.rossrealtycentralcity.com/listman/exec/search.cgi?search=1&perpage=10&sort_order=4,123,reverse&lfield7_keyword=Commercial+Property

That is my "index" page, but how do I go one step more to use the above publish_commercial template on JUST the detail page for the commercial listings? I know how to add the template to the URL along with the search query, but I'm confused how I would display the "normal" index (search results) and then use the commercial template for my detailed listing page (or printable listing sheet, in this case.)

Whew - that was a lot. I hope it wasn't too confusing. Thanks for your help!!


Donna
Staff / Moderator


Jul 17, 2009, 10:26 AM

Post #10 of 12 (9504 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Hi there!

Templates based off of the _publish_listing template only work if you're using it to view a single listing, not a search result. So, something like this:

http://www.rossrealtycentralcity.com/listman/exec/search.cgi?view=1&template=_publish_commercial.html

It won't work with both templatecells in there -- you'll want to remove the "row" templatecells, as they're gumming things up a bit. :)

For a search result (like the other URL you gave) you'll want to base that off of the _search_results.html.

Let me know if that makes sense to you. :)

Donna

--
support@interactivetools.com


rlindauer
User

Jul 21, 2009, 7:07 AM

Post #11 of 12 (9230 views)
Shortcut
Re: [Donna] Using More Than One Template [In reply to] Can't Post

Looks like my last reply didn't post, so let me clarify once more.

I think I understand the templates now. However - how do I get ONLY commercial listings to use the _publish_commercial template?

Let's say a user searches for commercial listings and then sees the search results page. I figured out how to use a separate search results page for commercial properties, so all is fine and dandy to this point. But - how can I get those same commercial listings to use the _publish_commercial template when a user clicks on the link to see full details of the listing?

I was previously thinking that I could make this work by adding the &template=_publish_commercial.html to the URL, but I cannot add anything to this tag, correct?
<a href="$listing_url$/$listing_file$" target="_blank">$lfield1$</a>

If there is a way to get from the (Commercial only) search results to an individual listing that uses the _publish_commercial template, then I'll be set!

Thanks for hanging in there with me on this one!


Donna
Staff / Moderator


Jul 21, 2009, 11:52 AM

Post #12 of 12 (9210 views)
Shortcut
Re: [rlindauer] Using More Than One Template [In reply to] Can't Post

Hi there,

Basically when you're linking to your specific template, you'll also want to add an extra query to tell it which listings to use. So:

&template=_publish_commercial.html&lfieldX_keyword=commercial

...where "lfieldX" is the field you're storing the "Category" in.

See this page for details:

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

For the link to the listing URL, you would again use a search query like this in your commercial search results:

<a href="/path/to/search.cgi?view=$listing_num$&template=_publish_commercial_listing.html">$lfield1$</a>

Does that make sense? Let me know how that works. :)

Donna

--
support@interactivetools.com