Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Adding in PHP code

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

Page: 1
Go to End
Author Topic: 1643 Views
  • Magicmark
    Avatar
    Community Member
    1 Post

    Adding in PHP code Link to this post

    I've just started looking into Silverstripe having developed a couple of sites in Wordpress and found it not quite fitting my needs. Open Source is great but a client will always ask for bits adding on.

    So... I am looking a add a zip code locator such as 'Lookup Runner' to my silverstipe site http://www.lookuprunner.com does anyone know if this sort of thing is possible.

    Thanks in advance

  • mark_s
    Avatar
    Community Member
    78 Posts

    Re: Adding in PHP code Link to this post

    Hi.

    Yes, you can add PHP code from other sources into your SilverStripe site. A common practice is to create a "thirdparty" directory in your mysite folder (or module folder, if you're creating a module).

    You may want to exclude that PHP code from being included by the manifest builder when a dev/build is run. This can be achieved by creating a file called _manifest_exclude in the folder that contains the third party code. (Note the leading underscore).

    Then you can require() that code as requires in your site logic.

    Mark

    1643 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.