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.

General Questions /

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

Creating custom PHP pages


Reply


3 Posts   1207 Views

Avatar
monnick

Community Member, 6 Posts

23 December 2010 at 6:54am

I am currently building a website using Silverstripe, my first time...The website is going to have a lot of "custom PHP pages" which communicate with an external database. They are all kinds of pages: userlists, order books, change personal information and so on. All these pages occur once on the site and are more or less static. Except of course the content retrieved from the external database.

I have read the Silverstripe documentation page "Extending a basic site" but I was wondering if this is the right way for me to create these pages? This way of creating custom pages seems rather difficult and I don't want to use objectoriented php in my custom scripts. Maybe what I am looking for is a kind of wrapper page which allows me to load the php pages. I can't really find anything about this. What is the method I want to use for these pages? :)

(I hope the question is clear like this)

Avatar
swaiba

Forum Moderator, 1799 Posts

24 December 2010 at 10:04pm

What do you mean by custom page? If it has custom behaviour you may need to create a page type for each, but if the behaviour is similar then you could use just one page and place the logic and the parameters in it's $db array.

Also I'd follow banal's advice on connecting to an external database...
http://www.silverstripe.org/customising-the-cms/show/13692#post293308

Avatar
monnick

Community Member, 6 Posts

25 December 2010 at 12:03am

Oke, thanks!

The advice on connecting to an external database is very handy! :)