Is there a way to integrate a include PHP file in Silver stripe CMS?
Thanks
Edwin
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Is there a way to integrate a include PHP file in Silver stripe CMS?
Thanks
Edwin
Please explain in more detail what this PHP file is. If it simply echos values then no, you cannot use it. If it returns something (like an array) then you just need a custom function..
// mysite/code/Page.php
function IncludeSomethingCool() {
require_once('something/cool.php');
// say that cool.php contains a static method foo
return cool::foo();
}
Then in your template use $IncludeSomethingCool.
Hi
I have a Php Calender that i would like to integrate in one of the SS files.
<?php include('calendar.php'); ?>
Thanks
Edwin