Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

change page type


Go to End


4 Posts   1791 Views

Avatar
Mianelle

Community Member, 9 Posts

24 June 2010 at 12:25am

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

Avatar
Devlin

Community Member, 344 Posts

24 June 2010 at 1:23am

Edited: 24/06/2010 1:30am

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.

Avatar
Mianelle

Community Member, 9 Posts

24 June 2010 at 11:02pm

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

Avatar
Mianelle

Community Member, 9 Posts

24 June 2010 at 11:12pm

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