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

Page Ordering Disabled #786

Closed
metadiv opened this issue Sep 19, 2016 · 5 comments
Closed

Page Ordering Disabled #786

metadiv opened this issue Sep 19, 2016 · 5 comments

Comments

@metadiv
Copy link

metadiv commented Sep 19, 2016

I cant seem to get the admin ordering fields to work for pages in a collection of prefixed folders.

Page Order
Parent setting order, ordering disabled

appears above the stack of page name 'advanced' tab.

image

In the parent page's markdown file I am using :

---
title: 'page title'
content:
    items: '@self.children'
    order:
        by: default
        dir: asc

---

Previously this worked but I have recently upgraded my site to the latest version of Grav and Admin.

I can confirm that manually modifying the folders prefixes does re-orders them correctly in the front end, but as I need to hand this site off to less techy colleagues it would be great to give them control from the admin ui.

Any suggestions please?

@rhukster rhukster added the bug label Sep 21, 2016
@rhukster
Copy link
Member

This looks like a bug. Will get it looked at. Thanks.!

@metadiv
Copy link
Author

metadiv commented Sep 22, 2016

@rhukster Yes it worked on the previous build I had before I upgraded.

One other question. Do you know if its possible to setup either the entire system or via a page type blueprint to automatically enable folder prefixing even if the page created is the first sibling in its parent?

@rhukster rhukster added by design and removed bug labels Sep 29, 2016
@rhukster
Copy link
Member

rhukster commented Sep 29, 2016

Ok the problem is in your frontmatter, and it's still not going to work for you until you remove the items: section of the header. This is because you cannot manually reorder if you are setting the content.items manually. Manual reorder is just for an arbitrary collection of page folders in a particular directory: https://github.com/getgrav/grav-plugin-admin/blob/develop/themes/grav/templates/forms/fields/order/order.html.twig#L17

Imagine if you had a content: items: '@taxonomy.... collection. This cannot be reordered of course.

This has not changed since Feb 1st. There was a bug where this logic was not being tested properly. Perhaps that is the version you updated from? If so it was a buggy version, that is now fixed.

@metadiv
Copy link
Author

metadiv commented Sep 30, 2016

@rhukster Thanks for the explanation. I can confirm removing the item: self.children from the parent works.

Can I ask though my 2nd question, is there a way to enable folder prefixing as a default, either int he site settings or as a blueprint function?

@rhukster
Copy link
Member

Please open a new issue for this question. Thanks!

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