Hot answers tagged

5

From what I saw in a comment from Mark Croxton here: http://devot-ee.com/add-ons/support/stash/viewthread/8717 EE tries to cache tags that are used multiple times within the same template. To get around this, there's a "random" keyword that EE looks for that will cause it to use a separate marker for this tag (causing the tag to parse twice) The problem ...


2

If you were to output your Channel Video tag loop into a Stash list, using {stash:set_list}, then you could pull a random subset out via {stash:get_list orderby="random" limit="2"}. Here are links, for more info: Stash Set List and Stash Get List. There also are lots of Stash list examples here on the EE Stack Exchange.


2

If you can get the total number of returned results (say, 10 videos) you could probably use one of the two add-ons below to return a random number in that range for a {if count == "3"} conditional? http://devot-ee.com/add-ons/random-between or http://devot-ee.com/add-ons/low-random Just thinking outside the box with no experience with Channel Videos.


2

Two approaches come to mind, the first is to load everything (all results) and only show X at a time (JavaScript) based on your own custom pagination or lazy loading effect. But that means you'd still be sending to the browser all the raw html initially, so might have performance issues. How channel:entries works with the limit parameter in ExpressionEngine ...


2

So it looks like I have to disable "Cache Dynamic Channel Queries?" in Admin->Channel Administration->Global Channel Preferences For random ordering to function properly


1

There's two issues - the generation of the original ids in the parent and your example not using pagination. You've not given the code for how the entry IDs are generated in the parent, but will it always be different upon each visit for the same user or it generates the same entry IDs? Assuming that the parent is generating the same Entry ID list for that ...


1

a quick thought come to my mind is to create templates with the same name and change the prefix number for e.g: test_1,test_2,test_3......,test_100 then use this plugin to generate the random number: http://devot-ee.com/add-ons/random-between {embed='test_{exp:ga_randombetween start="0" stop="100"}'} Regard's.


Only top voted, non community-wiki answers of a minimum length are eligible