tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/268-set-page-block-to-display-random-blocks-from-within-a-specific-folderCascade CMS: Discussion 2018-10-18T20:36:08Ztag:help-archives.hannonhill.com,2010-02-09:Comment/41398352010-12-06T23:17:33Z2010-12-06T23:17:33Zset page block to display random blocks from within a specific folder<div><p>We currently have a Banner block that we use to display an image
under our navigation.</p>
<p>For specific pages - we have a specific image (the News page has
a news image).</p>
<p>For all other pages we have a folder of blocks that contain the
images we would like to randomly populate to each page. Is there a
way in Cascade to do this? So the user wouldn't have to choose a
block when creating the page and Cascade would automatically assign
1 block out of the 20 or so that are in a specific folder in a
random (or apparently random order).</p></div>lauren.frasertag:help-archives.hannonhill.com,2010-02-09:Comment/41398352010-12-07T17:41:33Z2010-12-07T17:41:33Zset page block to display random blocks from within a specific folder<div><p>Not sure how deep into XSL you get, or what version you're on,
but I would create a Data Definition Block, attaching the 20 blocks
to a block chooser data definition. In the XSLT, then, you could
use the Xalan JavaScript component to generate a random number and
choose from among the attached blocks. (Here's Xalan used to
convert a date: <a href=
"http://www.hannonhill.com/kb/RSS-Feed/">http://www.hannonhill.com/kb/RSS-Feed/</a>)</p>
<p>In fact, now that I think about it, there's a video from the
user conference that describes a more complex, but more flexible,
technique for doing just the kind of thing you're describing.
<a href=
"http://www.hannonhill.com/news/conference/2010/videos/Dynamic-Asset-Management.html">
http://www.hannonhill.com/news/conference/2010/videos/Dynamic-Asset...</a></p></div>Eric L. Eppstag:help-archives.hannonhill.com,2010-02-09:Comment/41398352010-12-07T18:16:09Z2010-12-07T18:16:09Zset page block to display random blocks from within a specific folder<div><p>Thanks Eric. I'll take a look at these two resources. We're
working fast and furious to get our site ready. So this may be
something we implement after our go live.</p></div>lauren.fraser