Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Restricting assets SS indexes

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: 371 Views
  • WandL
    Avatar
    Community Member
    4 Posts

    Restricting assets SS indexes Link to this post

    Hi All,

    I was wondering if there is a way to stop some folders/files being indexed by SilverStripe (3.1) when they are stored in the assets folder, we have files that are uploaded and extracted, the extracted folder I do not want this indexed automatically,

    Any ideas appreciated.

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: Restricting assets SS indexes Link to this post

    The easiest way is to start the name of the folder with an underscore.

  • WandL
    Avatar
    Community Member
    4 Posts

    Re: Restricting assets SS indexes Link to this post

    Okay thanks Simon didn't know that, is that in the documentation?

    And the hard way?

  • WandL
    Avatar
    Community Member
    4 Posts

    Re: Restricting assets SS indexes Link to this post

    Hi I just tried that and it doesn't work creating a folder with an leading underscore like '_foldername' still gets indexed by Silverstripe in Files.

    Any other ideas?

  • Devlin
    Avatar
    Community Member
    215 Posts

    Re: Restricting assets SS indexes Link to this post

    Yes. The leading underscore doesn't work anymore... in favour of a hardcoded '_resampled' or '_combinedfiles'... though not sure why...

    You can use the dot as the prefix (.myfolder) or you can define your own blacklist pattern:

    e.g.

    # blacklist the underscore
    Filesystem:
    sync_blacklisted_patterns:
    - '/^\_/'

  • WandL
    Avatar
    Community Member
    4 Posts

    Re: Restricting assets SS indexes Link to this post

    Hi Devlin, thank you that worked at treat!

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