Jump to:

23471 Posts in 18937 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » change page type

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1158 Views
  • Mianelle
    Avatar
    Community Member
    9 Posts

    change page type Link to this post

    Hi there,

    I have difficulties changing the page type via Silverstripe. According to the tutorial I need to create an other php file, which I have done in Dreamwever and saved it in the same location as the defualt file page.ss. Nothings happens in the CMS after doing this despite the fact that I put in the code

    <?php
    /**
    * Defines the HomePage page type
    */

    class HomePage extends Page {
    static $db = array(
    );
    static $has_one = array(
    );

    }

    class HomePage_Controller extends Page_Controller {

    }
    ?>

    in the HTML file as suggested.

    Can I not use Dreamweaver at all to create my own template for the CMS?

    Hope some one can help me.

    Thank you

    Mia

  • Devlin
    Avatar
    Community Member
    215 Posts

    Re: change page type Link to this post

    which I have done in Dreamwever and saved it in the same location as the defualt file page.ss

    The PHP file needs to be in the same directory as mysite/code/Page.php not mysite/templates/Page.ss.

  • Mianelle
    Avatar
    Community Member
    9 Posts

    Re: change page type Link to this post

    Hi there,

    Thanks for your feedback. While trying out your suggestion I have messed something up. When I try to access this link
    http://localhost/silverstripe/index.php/admin/dev/build?flush=1

    Warning: fopen(C:\Windows\TEMP\/silverstripe-cacheC--wamp-www-silverstripe/manifest-index) [function.fopen]: failed to open stream: Invalid argument in C:\wamp\www\silverstripe\sapphire\core\ManifestBuilder.php on line 112

    Fatal error: Cannot write manifest file! Check permissions of C:\Windows\TEMP\/silverstripe-cacheC--wamp-www-silverstripe/manifest-index in C:\wamp\www\silverstripe\sapphire\core\ManifestBuilder.php on line 116

    I can nor either access the admin anymore... huh?

    Any suggestions in how to fix it

    thank you very much

  • Mianelle
    Avatar
    Community Member
    9 Posts

    Re: change page type Link to this post

    Hi again

    I can access the admin and the template a made in Dreamweaver are shown in a weird setup within the CMS, but I can not navigate in the CMS systemt... it looks really weird

    I made a screen shot and attached it to make it more clear...

    hmmmm

    Thank you

    Attached Files
    1158 Views
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.