Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Can I add a folder along with cms, saffire etc.. that does not get processed by the framework

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

Page: 1
Go to End
Author Topic: 816 Views
  • DusX
    Avatar
    Community Member
    12 Posts

    Can I add a folder along with cms, saffire etc.. that does not get processed by the framework Link to this post

    I would like to be able to add folders of non module, non silverstripe code that I will use in a variety of ways (called my Javascript is one). There are many good php classes out there that could be used my the system if they didn't have to conform to the frameworks rules.

    Is there a config setting that can be added to a config file in a folder that tells sapphire to ignore the folder contents?
    Or does not including a config (I know its a requirement for modules) cause this?

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Can I add a folder along with cms, saffire etc.. that does not get processed by the framework Link to this post

    Yes you can include a folder of your own totally separate classes without SS including it on your behalf.

    If you include a _config.php (can just be an empty file) file in your folder then SilverStripe will read and automatically include all the files / classes you have in that folder for you. If you do not want SilverStripe to automatically load all your files then don't include a _config.php file. But then you will have to include your files the standard PHP way using require() and include().

    If you have a folder that is inside a module which is being parsed then you can have a '_manifest_exclude' file (no extension and no content) inside any folder which will prevent SilverStripe from reading it or any of its children.

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: Can I add a folder along with cms, saffire etc.. that does not get processed by the framework Link to this post

    great, I thought it should be as simple.
    That really opens up what can be done as far a quick modules etc...
    Guess my next step is to look for a tutorial on making a module.

    thanks for all your help Willr... I am slowly starting to feel like I am getting a better grasp of SS and finally starting to understand the API docs.
    I do however think that this is one spot another small tutorial might be very worthwhile... something that walk you through checking the API docs of an object to find related subclasses and methods that you can use... Would be very useful to us newbies.

    anyway I got off topic.
    Cheers

    816 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.