 |

russg
New User
Oct 15, 2003, 8:10 PM
Post #1 of 3
(3278 views)
Shortcut
|
|
sample code using rating_0 indicators
|
Can't Post
|
|
Sorry if this already exists, but I couldn't find any examples. Does someone have a sample piece of code to implement the ratings categories in the search results? Similarly, I'm trying to use the result_rows in the calling form to limit the number of search returns, but can't get it to work. Any examples would be appreciated.
|
|
|  |
 |

Luke
Staff
/ Moderator

Oct 17, 2003, 4:40 PM
Post #2 of 3
(3260 views)
Shortcut
|
|
Re: [russg] sample code using rating_0 indicators
[In reply to]
|
Can't Post
|
|
Hi russg, Thanks for your post! :) The rating_x template cell allows you to output a rating in each of the search results. This means that site visitors will know which results mostly accurately match their search keywords. For example, placing the example code below will allow your site visitors to differentiate between which result in your search results was a good match, an average match, or even a below average match. <!-- templatecell : rating_0 --> Below Average Result <!-- /templatecell : rating_0 --> <!-- templatecell : rating_1 --> Average Result <!-- /templatecell : rating_1 --> <!-- templatecell : rating_2 --> Good Result <!-- /templatecell : rating_2 --> <!-- templatecell : rating_3 --> Great Result <!-- /templatecell : rating_3 --> And you're not just limited to using text, you could use images instead. You could have an image that clearly shows site visitors that the result is a good one (e.g. an image with 4 stars) or you could have an image that lets site visitors know the result is not so good (e.g. an image with 1 star). For example something like this. <!-- templatecell : rating_0 --> <img src="/images/no_stars.gif"> <!-- /templatecell : rating_0 --> <!-- templatecell : rating_1 --> <img src="/images/one_star.gif"> <!-- /templatecell : rating_1 --> <!-- templatecell : rating_2 --> <img src="/images/two_stars.gif"> <!-- /templatecell : rating_2 --> <!-- templatecell : rating_3 --> <img src="/images/three_stars.gif"> <!-- /templatecell : rating_3 --> <!-- templatecell : rating_4 --> <img src="/images/four_stars.gif"> <!-- /templatecell : rating_4 --> Once you have your template cells set up, add the $result$ placeholder to each of your result template cells (result_title, result_brief, and result_full). This is where your rating will be output within the search results. You'll want to add it somewhere within each of these three template cells where you feel it works best within the overall design of your template. As for your second question, are you trying to limit the number of search results you output per page (e.g. 5 results per page) or are you trying to limit the total number of results (e.g. don't show more than 100 results)? I look forward to your reply! Luke Holzken Product Development
(This post was edited by chris on Dec 10, 2003, 5:25 PM)
|
|
|  |
 |

russg
New User
Oct 17, 2003, 6:50 PM
Post #3 of 3
(3256 views)
Shortcut
|
|
Re: [Luke] sample code using rating_0 indicators
[In reply to]
|
Can't Post
|
|
Works like a champ! Thanks for the help!
|
|
|  |
|