Jump to:

23376 Posts in 18232 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » StaticPublisher publishing pages I have in my ignore list

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: 590 Views
  • Ryoken
    Avatar
    Community Member
    18 Posts

    StaticPublisher publishing pages I have in my ignore list Link to this post

    So I've got a site that was going to go live today, but I ran into a fairly major problem.

    I'm using StaticPublisher to cache all the pages, and I've set up an ignore list as mentioned in the docs ( I tried both ways, SQL Where condition in the DataObject::get and the $ignored array ).. It's fine when I run buildcache, but if I save the page from the CMS, and it's one of these Ignored pages, it gets published anyway..

    Is there any way around this ? I have some pages that need to be updated on a regular basis, but Cannot be cached for them to function properly.

    Thanks for any help anyone can provide.

  • Ryoken
    Avatar
    Community Member
    18 Posts

    Re: StaticPublisher publishing pages I have in my ignore list Link to this post

    So I had to hack around a bit.. Hopefully in a future release of SilverStripe, StaticPublisher will be a little better setup.

    For now I made a static array in my Page class of the classes I wanted ignored.
    In FileSystemPublisher I use the URLSegment to get the page class of each URL set to be published, and then run them against the ignore array before adding them to the $files array.

    In the future I would like to see StaticPublisher implemented a little differently.. My suggestion would be once enabling it, have Method in it's class that can be set in _config to list the ignored page classes. Ideally I'd like to see a checkbox in the Behaviour tab that would allow for caching on a page by page basis. This would, in my opinion, make it a far more useful tool, as having to hack in the CMS folder is not ideal.

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