Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfset r = Randomize()> (copy the line from the previous one, I don't feel like typing the whole thing again)
- <cfset moodList = ValueList(queryname.mood)>
- <cfset itemList = "">
- <cfloop condition="ListLen(itemList) lt 8">
- <cfset pos = Int(RandRange(1, ListLen(moodList)))>
- <cfif NOT ListContains(itemList, ListGetAt(moodlist, pos))>
- <cfset itemList = ListAppend(ListGetAt(moodList, pos))>
- <cfset moodList = ListDeleteAt(moodList, pos)>
- </cfif>
- </cfloop>
- <cfloop index="tag" list="#itemList#">
- <li><a href="#$.createHref(filename='mood-finder')#?mood=#tag#">#tag#</a></li>
- </cfloop>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement