 |

rts5678
User
Sep 8, 2004, 8:51 AM
Post #1 of 3
(3032 views)
Shortcut
|
|
Favorites.cgi Advanced Problem
|
Can't Post
|
|
To all Favorites.cgi advanced users, Is there a way to pass view=$listing_num$ to the favorites.cgi? I am using custom template to generate my "publish listing" file. Therefore when I pass the URL (or part of the URL) from my custom template to favorites.cgi, favorites.cgi does not seem to pickup/load the view=x (x being any number), as a result of which the person viewing his/her favorites is unable to get to the actual listing. So, if someone is using a custom publish listing template, is there a way to make that work with favorites.cgi? Any solution/approach would be appreciated. Thanks, Alex
|
|
|  |
 |

leeshields
User
Sep 8, 2004, 8:56 AM
Post #2 of 3
(3026 views)
Shortcut
|
|
Re: [rts5678] Favorites.cgi Advanced Problem
[In reply to]
|
Can't Post
|
|
Hi I helped out another user recently with this problem (i think, only read through your message quickly) Here is the email I sent to try and help out Ok I think I know whats wrong The listing you display is based on an alternate template, its not the actual html page produced by RM eg /l0233.html etc Therefore when you try to pass the URL on to the favourites page, there isn’t one (it doesn’t have the url because this page is created by the cgi) That’s why the link doesn’t work There are 2 ways to fix/bodge it a) use the actual listings page instead of the holiday template from your search results, then the data will be included b) Instead of creating a link using the file url, create another search in your fav view html file that searches for the specific reference number (which you can pass using the listdata fields), use match not keyword and it should be OK. So when you click it goes back to the search but only searches for the reference number and returns 1 result in the holiday template again. Not sure which way you will be able to go Lee Sounds like a similar issue Hope this helps Lee __ Lee Shields Apogee Technology John R Hornsby Adelante Properties Villassist Paul Withey Estate Agents
|
|
|  |
 |

rts5678
User
Sep 8, 2004, 10:14 AM
Post #3 of 3
(3014 views)
Shortcut
|
|
Re: [leeshields] Favorites.cgi Advanced Problem
[In reply to]
|
Can't Post
|
|
Lee, a fast response from you is very much appreciated. I had thought about both approaches you mentioned, but didn't go for either as I certainly wanted to use my custom template and not the actual listing template that comes with the program, and I didn't want to add an extra step by creating another search in fav_view.html file. I wanted a simple straight forward (URL based) solution to the problem. (URL based solution meaning, creating a favorites output URL with either pasting a full URL or part of a URL in the fav_view file, and/or passing a full URL or part of a URL from the custom publish listings template to the fav_view file). So here's how I cracked the problem (after quite a few painful hours), The approach includes using part of the URL from fav_view.html file and part of the URL from the your publish listing template (or whichever template page on your website you have provided the link to 'add to favorites'). My URL portion of fav_view.html file looks like this: <a href="$url$?view=$listdata1$&template=some_custom_template_you_are_using.html">$name$</a> My URL porition of my custom template 'Add to Favorites' link looks like this : url=$search_url$&listdata1=$listing_num$ The $url$ part in the beginning of the fav_view.html is filled/replaced by the *url=........* part from your "Add to Favorites" link embedded in your custom template. Here's the key step: What you do is make this assignment: 1-listdata1=$listing_num$ (in your custom publish listing template) 2-And, in the URL part of your fav_view.html, you make this assingment, view=$listdata1$ So what we have is the listing number(the most important part of the problem) being passed from your custom template as listdata1 to the fav_view.html file being outputted dynamically in the form of view=$listdata1$ in your final URL, giving you the final result. The above approach becomes a must when you are using listings manager for multiple categories eg. auto, realty, generic, etc and creating multiple custom templates (query, search results, publish listing) for each category in which case you need to make the output of favorites.html completey dynamic and independent of any category. Finally, if you are not using a custom search template, you may be able to adopt the above approach by using one url in either fav_view.html file, or from the *url=........* part from your "Add to Favorites" link embedded in your custom template, rather than borrowing part from each. Also, unrelated to the above problem, in favorites.cgi, it'd be appreciated if someone can address the filelock renaming issue, (changing it from filelock.lock to something else.lock) as favorites.cgi does NOT work without changing the name. (time cost = 2 hours, solution found in the forums). Many thanks to all who post in the forum regularly including interactive tools' great staff. Alex,
|
|
|  |
 | |  |
|