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

Feature Request: Prevent pages from being a parent #735

Open
remidesigns opened this issue Aug 15, 2016 · 5 comments
Open

Feature Request: Prevent pages from being a parent #735

remidesigns opened this issue Aug 15, 2016 · 5 comments

Comments

@remidesigns
Copy link

I would very appreciate an option for pages to prevent them from being a parent page. The background is, that one of my client has a very deep page hierarchy. When creating a new page, he has to scroll through about 500 pages to find the right parent. An option like this would tidy up the dropdown for setting the parent page drastically.

Approach as follows:

  1. Add a Y/N-ticker in the options pane of the page editor with "can be parent"
  2. Add a filter on the "parent page"-dropdown that looks for "can be parent" -> Y

Hope to find this feature in the next release :)

@rhukster
Copy link
Member

Page's must have a parent, even if their parent is ROOT. This is because we must know where in the page structure to put the page.

However, I think we can definitely improve the interface for choosing this.

@remidesigns
Copy link
Author

this is completely ok for me. and i do not want to prevent pages from having a parent, but from being a parent for other pages.

to be more specific on this:

in real life, the client has the following structure (there are 8 product categories. inside the categories there are up to 20 groups, and inside the groups up to 50 products):

  • home
    • products
      • category 1
      • category 2
        • group 1
          • product 1
          • product 2
          • product 3
          • ...
        • group 2
          • product 1
          • product 2
          • product 3
          • product 4
          • product 5
          • ...
        • group 3
          • product 1
          • product 2
          • ...
        • ...
      • category 3
      • ...

i want an option that hides the pages of "product x" from the "choose parent"-dropdown, because there should not be a child page inside a product.

@iskrisis
Copy link

This is right now i think the biggest pain in admin. A must feature.
From my experience with other similar filebased cmses:
Its usualy solved on page blueprint level. So in blueprint you says that it can have children or not. Also what is the most convinient is that you can also say what kind of template the children have.
Usualy when creating blogpost from admin:
You have something like /articles which is template articles.html.twig and then only sensible child is article.html.twig template. Prohibiting users to add pages of differend template is realy important.

I think anyone can profit from feature like that.

@haviladev
Copy link
Contributor

I've talked with Andy about this improvement months ago in gitter chat, but totally forgot to create the issue. In my case I have many modular pages that will never have childs pages, then I dont need them in the Parent select list. Something like sterile: true or however you guys like, will be great.

@iskrisis
Copy link

iskrisis commented Aug 22, 2016

Lots of people have problems with admin when they have many pages (guys on forums that have 5000 products of eshop etc.). Its almost never the case that some kind of data like blogposts/products/events would have children. Those are usualy your endpoint.

Modular should not able to have children by default actualy.

Also being able to define what kind of possible templates children of a page can have is almos as important as being able to define that they cant have children.

This would solve almost all problems with admin when using big amount of pages.

I dont want to sound like "MY USECASE IS THE IMPORTANT ONE" but coming from other flatfile cmses - ive done this on every single one website ive done.

But maybe its something devs are doing for Admin PRO? I am ok with that, i just think that grav is so advanced in some things (page collections for example) but it doesnt have this core functionality.

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

4 participants