Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Randomize i18n Search Results?
#1
I am currently using the i18 suite of plug ins and have it all working except the client requires the results of the page show the content randomly for every user. That way no one company is always on the top of the page when the results are displayed.

I found a random content script that uses a class="group1" to reorder content. I have already added it to the page and template for the page, but do not know how I could add the class to the output for the search results.

What I would like to have happen I think is add the class "group1" to this: <li class="search-entry "> in the output below.

I've tried adding the class on the page, but that does nothing. I don't know the syntax or where I would need to add this type of thing to the code. Any suggestions or ideas for how I can get the search results on this page only to be randomly shown would be appreciated!!

My template page is using (% searchresults tags:member numWords:25 %)

And this is some of the output: http://sa-test.info/index.php?id=members

______________
<h1>Members</h1>
<div>
<h2 class="search-header">Search Results</h2>
<ul class="search-results ">
<li class="search-entry ">
<h3 class="search-entry-title">
<a href="http://sa-test.info/index.php?id=generations&amp;lang=en">
Generations, Inc. </a>
</h3>
Imsep pretu tempu revol bileg rokam revoc tephe rosve etepe tenov sindu turqu brevt elliu repar tiuve tamia queso utage udulc vires humus fallo 25deu <br /><br /> </li>
<li class="search-entry ">
<h3 class="search-entry-title">
<a href="http://sa-test.info/index.php?id=allen-investigations&amp;lang=en">
Allen Investigations </a>
</h3>
Imsep pretu tempu revol bileg rokam revoc tephe rosve etepe tenov sindu turqu brevt elliu repar tiuve tamia queso utage udulc vires humus fallo 25deu <br /><br /> </li>
</ul>
</div>
<script type="text/javascript">
//randomize order of contents with DIV class="group1"
randomizeContent("group1")
</script>

______
Reply


Messages In This Thread
Randomize i18n Search Results? - by sarnaiz - 2012-05-23, 04:01:44
Randomize i18n Search Results? - by mvlcek - 2012-05-23, 04:23:50
Randomize i18n Search Results? - by sarnaiz - 2012-05-23, 04:43:58
Randomize i18n Search Results? - by mvlcek - 2012-05-23, 05:46:32
Randomize i18n Search Results? - by sarnaiz - 2012-05-23, 06:26:27



Users browsing this thread: 2 Guest(s)