Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » [SOLVED] Error creating a new page type

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

Page: 1
Go to End
Author Topic: 798 Views
  • madmaurice
    Community Member
    20 Posts

    [SOLVED] Error creating a new page type Link to this post

    I create a homepage for a fire department.
    They want to publish some information about there vehicles.
    I created a new module folder named fwmodule.


    class VehiclePage extends Page {
    static $db = array(

    static $has_one = array(

    class VehicleController extends Page_Controller {
    public function init() {



    <h1 class="title">Fahrzeug (Details)</h1>

    <div class="vehicledetails">
    <div class="photo">$Bild</div>
    <div class="details">
    <tr><td class="left">Fahrgestell</td><td class="right">$Fahrgestell</td></tr>
    <tr><td class="left">Motorleistung</td><td class="right">$Motorleistung</td></tr>
    <tr><td class="left">Aufbau</td><td class="right">$Aufbau</td></tr>
    <tr><td class="left">Baujahr</td><td class="right">$Baujahr</td></tr>
    <tr><td class="left">Funkrufname</td><td class="right">$Funkrufname</td></tr>
    <tr><td class="left">Besatzung</td><td class="right">$Besatzung</td></tr>
    <h2>Ausr&uuml;stung (besonders)</h2>

    and an empty fwmodule/_config.php

    sry for the names of the variables, im from germany^^

    the page type is shown in the backend and can be created but when i open the page i get nothing but the class name of the pagetype

    not even the design around it...

    Attached Files
  • Hamish
    Community Member
    712 Posts

    Re: [SOLVED] Error creating a new page type Link to this post

    Your page controller must be called VehiclePage_Controller.

    Also, I don't think you want the template in the /templates/ folder - you want it in the /templates/Layout folder so that it wraps your VehicalPage content in the normal page template.

    Also, it is good practise to use full <?php tags instead of <?

    Neither of these really explain the error though, but fix them up and see if it helps.

  • madmaurice
    Community Member
    20 Posts

    Re: [SOLVED] Error creating a new page type Link to this post

    Works. I think this was because of the Layout folder cause i already tried VehiclePage_Controller in an earlier version but forgot to copy it when switching to a newer version of 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.