Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » _exclude.php

Our old forums are still available as a read-only archive.

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

Page: 1 2
Go to End
Author Topic: 3504 Views
  • Nathan Cox
    Avatar
    Community Member
    99 Posts

    _exclude.php Link to this post

    Hi, I was experimenting the other day and wanted to exclude certain directories from being processed. _exclude.php does the trick, but I was wondering if it wouldn't make more sense to have a way of specifying modules to EXCLUDE instead of INCLUDE.
    With the current

    ManifestBuilder::$restrict_to_modules = array(
    'cms',
    'jsparty',
    'mysite',
    'sapphire'
    );

    you have to update it every time you add a new module you want processed, right?
    I think it would be handy to have the option of saying

    ManifestBuilder::$exclude_modules = array(
    'yoursite'
    );

    or even ManifestBuilder::$exclude_modules[] = 'yoursite';

    Just a thought..

  • xmedeko
    Avatar
    Community Member
    94 Posts

    Re: _exclude.php Link to this post

    _exclude.php is just what i need. thanks

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: _exclude.php Link to this post

    The next version of SilverStripe requires the presence of an _config.php in each of your module folders. So that by default, non-SS folders won't be interpreted as part of SilverStripe.

  • Nathan Cox
    Avatar
    Community Member
    99 Posts

    Re: _exclude.php Link to this post

    That makes sense...speaking of which, do you guys have some kind of timeframe for 2.1?

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: _exclude.php Link to this post

    It depends on Google Summer of Code to a big degree. The first milestone for their work is July 9 so hopefully shortly after that we'll be able to see how quickly all their work is going...

  • Markus
    Avatar
    Google Summer of Code Hacker
    152 Posts

    Re: _exclude.php Link to this post

    I just committed a change to the ManifestBuilder to the GSoC branch so that now it is possible to exclude any directory (and all its subdirectories) from inclusion by adding a _manifest_exclude file.

    The changes are in r38451. Maybe you can add that already to the 2.0.2 version since after reviewing the code.
    It's a small change and but I think nevertheless it would help a lot of people.

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: _exclude.php Link to this post

    I'm not sure it is needed when 2.0.2 automatically assumes folders are not to be included; you can download this code right now...

    (as sam mentioned, you must specifically include each directory you want... )

  • Markus
    Avatar
    Google Summer of Code Hacker
    152 Posts

    Re: _exclude.php Link to this post

    Is it not so that all (top-level) directories with an _config.php file and all of its subdirectories are automatically included?

    With the patch you can exclude subdirectories and also directories of other applications that use an _config.php file.

    3504 Views
Page: 1 2
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.