Posted By

petterdr on 03/28/09


Tagged

ss silverstrip holder


Versions (?)

Holder Page


 / Published in: PHP
 

  1. <?php
  2. /**
  3.  * Defines the ArticleHolder page type
  4.  */
  5. class ArticleHolder extends Page {
  6. static $db = array(
  7. );
  8. static $has_one = array(
  9. );
  10.  
  11. static $allowed_children = array('ArticlePage');
  12. }
  13.  
  14. class ArticleHolder_Controller extends Page_Controller {
  15.  
  16. }
  17.  
  18. ?>
  19.  
  20.  
  21. Then template is
  22. ArticleHolder.ss
  23.  
  24. $Content
  25. <ul id="NewsList">
  26. <% control Children %>
  27. <li class="newsDateTitle"><a href="$Link" title="Read more on &quot;{$Title}&quot;">$Title</a></li>
  28. <li class="newsDateTitle">$Date.Nice</li>
  29. <li class="newsSummary">$Content.FirstParagraph <a href="$Link" title="Read more on &quot;{$Title}&quot;">Read more &gt;&gt;</a></li>
  30. <% end_control %>
  31. </ul>

Report this snippet  

You need to login to post a comment.