17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2632 Views |
-
php include in Layout/NewPage.ss

5 June 2008 at 4:02am
Hi All
Have a question. Can I put a php include in a Layout/page.ss file?
Basically, I have a page from outside SilverStripe that I want to include. I tried the iFrame module but I don't have a specific page size as the page that will load into the frame is dynamic so the length can change.
As a workaround, I made a new page type, with a new layout template - but can I call the page I need with php include? I tried it but I get an error. Any ideas?
-
Re: php include in Layout/NewPage.ss

15 June 2008 at 10:21am
There is no way that I know of to embed PHP files in the template files - I think that would violate the whole MVC approach aswell. Your best idea is like you said, a seperate page type or convert your php to a Silverstripe class - doesnt need to be a page type if its not a whole page by itself but just a bit of functionality so it could extend DataObject instead of Page... anyway that and give it a separate page template would be the way to go
| 2632 Views | ||
|
Page:
1
|
Go to Top |


