Revision: 24228
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 23, 2010 22:26 by petterdr
Initial Code
In the CONTROLLER function DiveSites() { $DiveSites = DataObject::get("DiveSitePage", "", "RAND()", "", "3"); // Debug::show($DiveSites) return $DiveSites; } In the TEMPLATE <% control DiveSites %> <div id="TasmanianDiveSiteSummaryHomePage" > <% control MainImage %> <% control SetWidth(50) %> <a href="$Top.Link" > <img src="$URL" alt="Image of the $Top.Title"/ class="left"> </a> <% end_control %> <% end_control %> <div class="Summary"> <h4>$Title</h4> <div class="SummaryText"> $Summary</div> <p> <a href="$Link" title="Find out more about this dive site "{$Title}"">Find out more about this dive site </a> </p> </div> </div> <% end_control %>
Initial URL
Initial Description
For using in Silverstrip CMS
Initial Title
Get 3 random objects for display on a Silverstrip template
Initial Tags
Initial Language
PHP