Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Modular page ordering

Started by Muut Archive 10 years ago · 5 replies · 1342 views
10 years ago

It drives me crazy. Sorry to ask again.

As I think I got it … all goes wrong.

My MD-file:

YAML
title: Homepage
menu: Home
content:
    order:
        custom:
            - _headline-content
            - _content-photo
            - _photo-content
            - _content-columns
    items: '@self.modular'
onpage_menu: true

When I set (admin) …
Items: Children
Order by: Default
Order: Ascending

… than I have the correct output at the front-end. But the back-end (admin) is something totally different.
I think it is sorted alphabetically.

How can I manage to have both front-end and back-end to match what I define?
And why does GRAV change my custom order – explicitly set in the MD-file – if I change order or order by? That is confusing as hell :-)

10 years ago

The admin really doesn't take into account the ordering the page sets. It just gets the pages as they are found in the filesystem. This way it mimics how it would look if you looked at the folders in Explorer or Finder (or whatever file browser your OS uses).

This is because Grav is a file-based CMS, and as such, we find things make more sense if the admin mimics the files. The admin really is a GUI for those that don't have direct access to the filesystem after all.

10 years ago

I can follow what you mean. But that makes GRAV not a Content Management System, but rather more of a Content System in that particular field.

Image a developer defines that order:
Homepage

  • About us
  • Products
  • History
  • FAQ
  • Get in touch
  • Credits
  • Links

… and the editor sees in GRAV
Homepage

  • About us
  • Get in touch
  • History
  • Products
  • FAQ
  • Links
  • Credits

If you have to follow a straight line throughout your copy that is a nightmare.
What about if a client wants to edit the content in a year and needs to reorder the blocks?

10 years ago

Like I said, i'm open to adding this functionality, just please add an issue so it's not lost in the noise. Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1349 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago