Jump to:

1386 Posts in 494 Topics by 523 members


SilverStripe Forums » Themes » Problem with subtemplate

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 971 Views
  • StarForce
    Community Member
    11 Posts

    Problem with subtemplate Link to this post

    I´m trying to display my Spielbericht Class with a subtemplate, but have some problems with it...

    My Spielbericht class file mysite/code/Spielbericht.php

    class SpielberichtPage extends Page {

       public static $db = array(

       public static $has_one = array(

    class SpielberichtPage_Controller extends Page_Controller {

       function AnzeigenSpielbericht(){
          $game = new DetailedGame();
          return $game->DisplayTableHTML();

    I´ve also created a Spielbericht.ss file:
    themes/djkwallstadt/templates/Layout/Spielbericht.ss (yes, i use a custom template)

    <div class="typography" id="mainContent">

    when i load the page, it is not working, but when i add $AnzeigenSpielbericht to the Page.ss, everything works fine (so there is no problem with the function)

    Can you help me?
    I use the 2.4 release

    Thank you


  • StarForce
    Community Member
    11 Posts

    Re: Problem with subtemplate Link to this post

    argh.... found the problem

    should be SpielberichtPage.ss and not Spielbericht.ss


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.