PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Randomize recommended links?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Randomize recommended links?

    Is there anyway to randomize the display/order of recommended links? For example, say I have 5 recommended links for the keyword "test" and I have it limited to show up to 2 recommended links per search query.

    Right now it appears that the same top 2 recommended links for the keyword will always show no matter what unless I manually change the order. Is there functionality to randomly display ANY 2 links out of the 5 randomly rather than only displaying the top 2 or whatever I set the limit at?

    Essentially I'd like to use it as a type of lead generator, but I don't want the same links showing all the time and would like it done randomly so there is no favoritism.

  • #2
    There is no function to display a random sub-set of results. You would need to write your own code to do this.

    Comment


    • #3
      Maybe someone already wrote something like this? Plz help...

      Comment


      • #4
        Doesn't this defeat the purpose of recommended links?

        Bob
        Robert Isaac
        Volvo Owners Club

        Comment


        • #5
          We are not aware of anyone writing code for this (or even asking for this) in the past.

          Comment


          • #6
            I don't see how it would defeat the purpose of recommended links. Essentially all I want to do is say if I have 5 recommended links for a keyword and the limit to display is only 2, I don't want the top 2 in the list to always display, but have 2 out of the 5 display randomly. The way it is coded now, you can have an unlimited amount of recommended links for a single keyword, if the amount of links exceed the limit to display, only the top x links will always show where x is the display limit and the rest of the recommended links are essentially ignored and never displayed.

            I will look into customizing this code to display randomly:
            Code:
                ' Show recommended links if any
                Dim num_recs_found
                num_recs_found = 0
                if (Recommended = 1) then        
            ...
                    if (num_recs_found > 0) then
                        Response.Write("</div>")
                    end if
                end if

            Comment

            Working...
            X