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

luya\cms\menu\Item: getPrevSibling() and getNextSibling() do not sort by sortIndex #170

Closed
rolandschaub opened this issue Dec 13, 2018 · 1 comment
Assignees

Comments

@rolandschaub
Copy link
Member

public function getNextSibling()

getPrevSibling() and getNextSibling() return one menu item that has a smaller (prev) or higher (next) sortIndex than the current menu item. This doesn't always work correctly as the query is not sorting the menu items by SortIndex.

@nadar nadar self-assigned this Dec 13, 2018
@nadar
Copy link
Member

nadar commented Dec 13, 2018

There is an orderBy method which could be added (https://github.com/luyadev/luya-module-cms/blob/master/src/menu/Query.php#L318-L330) would you like to send a PR?

@nadar nadar closed this as completed in 31076ed Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants