/ Published in: PHP
                    
                                        
For using in Silverstrip CMS
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
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 %>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                