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

integrating outside php code into silverstripe


Go to End


5 Posts   1464 Views

Avatar
theoldlr

Community Member, 103 Posts

16 February 2010 at 9:16am

Hi all,

http://www.agilecarousel.com/instructions

I am trying to figure out how to make this carousel that uses jQuery, css, and some php code SilverStripe friendly. I know the proper way to include the javascript for use and know I should put this php into controller functions but I'm not quite understanding how this all connects--I'm still quite weak with php. The instructions tell you to alter a few lines of the javascript to match your relative path to the included php file, but I'm not sure what to do in this case if the code will end up being in a controller function.

Thanks in advance!

Avatar
Webdoc

Community Member, 349 Posts

16 February 2010 at 10:03am

Why outside if u can use inside page type make page in mysite code with needed fields as holder and then make the page for holder then make the holder template and use the holders children page as a slider item. If also wanna make it linkable then just make the page where u need to link as allowed_children in holder .php file

what fields u mean i can make sample code.

Avatar
theoldlr

Community Member, 103 Posts

16 February 2010 at 11:19am

Maybe I phrased some of my original post poorly. What I want to do is to take the code for the agile carousel ( http://www.agilecarousel.com ) and convert it into silverstripe friendly code. I plan on using it on my Page page type.

They give you a few js files, a css file, and a php file. The download link is here: http://agile-carousel.googlecode.com/files/jquery.agile_carousel-beta.2.0.zip

and the non-silverstripe installation instructions here: http://www.agilecarousel.com/instructions

Now all I need are silverstripe friendly instructions. Heck, I'll settle for silverstripe friendly guidance.

Thanks, all!

Avatar
Webdoc

Community Member, 349 Posts

16 February 2010 at 12:39pm

Ok i look what i can do but if u use it in page.php and layout/page.ss
then its gonna be in everypage where u use normal Page as page.

Avatar
theoldlr

Community Member, 103 Posts

16 February 2010 at 5:02pm

Having it on every page is what i intended, so that will work great. Thanks, Webdoc!