Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.

Filtering in the front end #3

Open
eighthday opened this issue Apr 9, 2019 · 3 comments
Open

Filtering in the front end #3

eighthday opened this issue Apr 9, 2019 · 3 comments

Comments

@eighthday
Copy link

I have installed the plugin ok, but I can't get the date field to have any any effect in the front end. This is what I have:

<?php foreach ($articles = $site->children()->listed()->sortBy('pub', 'desc')->paginate(50)->isunderembargo(false)->issunset(false) as $page): ?>
...
<?php endforeach ?>`
@HashandSalt
Copy link

It's not working for me either. I know it did work though - maybe a problem the current release of Kirby?

I have simpler collections and its just not reacting at all to the dates, but it did some time ago.

@omz13
Copy link
Owner

omz13 commented May 20, 2019

I just did a test against the latest RC (kirby-3.1.4-rc.1) and it seems to work just fine for me.

How have you configured the plugin? Specifically, did you set omz13.suncyclepages.embargoCheckWhenTemplateIs (an array of templates where the embargo/sunset check is to be done) omz13.suncyclepages.embargoCheckWhenParentIs (similarly for parent-based check).

If you still have problems I can throw in some additional diagnostics when running a site under debug mode.

@HashandSalt
Copy link

Explicitly setting both of those in the config fixed it for me, but the readme says these options are optional. Should it not just work out of the box without setting those?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants