Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next/previous doesn't listen to with_scope #1023

Open
ulitiy opened this issue Jan 28, 2015 · 1 comment
Open

Next/previous doesn't listen to with_scope #1023

ulitiy opened this issue Jan 28, 2015 · 1 comment
Labels

Comments

@ulitiy
Copy link

ulitiy commented Jan 28, 2015

Some dirty code to fix it:
https://gist.github.com/ulitiy/b2757646ae6102faa130

could pass context inside model, but doubted if it would be better than to copy with_scope logic here.
could create ContentTypeProxyCollection, but no context inside (could set it though)

Don't know what solution is better, but at least it works. It's necessery feature for example if you need next/prev inside subcategories of entries.

Maybe it would be better to keep next/prev and other liquid logic outside models. To make the engine more modular.

@did
Copy link
Member

did commented Oct 18, 2015

@ulitiy good point. The code has been moved to Steam (https://github.com/locomotivecms/steam/blob/master/lib/locomotive/steam/repositories/content_entry_repository.rb#L87).
That should not be too hard to pass a conditions hash to the next/previous methods and wire everything with the matching liquid drop class.

@did did added the feature label Oct 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants