21475 Posts in 5781 Topics by 2620 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 451 Views |
-
StaticPublisher publishing pages I have in my ignore list

17 March 2011 at 10:27am
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.
-
Re: StaticPublisher publishing pages I have in my ignore list

18 March 2011 at 5:17am
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.
| 451 Views | ||
|
Page:
1
|
Go to Top |

