Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 12th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. class Utdoa_Controller extends Page_Controller
  3. {
  4.         public $siteSection='utdoa';
  5.        
  6.         function isTitleTrueStories()
  7.         {
  8.                 return ($this->Title == "True Stories");
  9.         }
  10.         function index(){
  11.                 if($this->Parent->Title == "True Stories") {
  12.                         return $this->renderWith("TrueStory");
  13.                 }
  14.                 else {
  15.                         return Array();// execution as usual in this case...
  16.                 }
  17.         }
  18.  
  19. /////////Added:
  20. /////////   templates/TrueStory.ss (exactly the same as utdoa.ss)
  21. /////////   templates/Layout/TrueStory.ss (with the fake title)