getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 227 forks source link

Question: Custom Order of Modular Content #935

Open trendschau opened 7 years ago

trendschau commented 7 years ago

I am aware of the possibilities to order the modules in a custom manner with YAML like this:

content:
   items: '@self.modular'
  order:
      by: default
      dir: asc
      custom:
          - _showcase
          - _highlights
          - _callout
          - _features

But is there a way to add a custom order for the modules in the admin panel, so that a content-editor can create an order without editing a yaml-file? A drag & drop with something like this would be nice:

  content:
    type: order
    items: '@self.modular'

In most cases, the predifined standard-ordering (date, prefix, folder) does not make much sense for modular content and one-pager.

flaviocopes commented 7 years ago

We have in mind a custom view for modular pages, that could be ordered using drag-and-drop, just didn't make it yet. Right now the best option is to order by title, and use a letter or number as the first item in the title (1 - this, 2-that) to make it easy.

trendschau commented 7 years ago

Thank you, that sounds good, so I am looking forward to this enhancement :-)

olivierdalang commented 7 years ago

The thing I don't get is that it seems this exact feature works well for regular pages ? It's just that the ordering is disabled for modulars, because it says "ordering set by parent", while in most cases, the parent doesn't set the ordering as it's supposed to be "default" and the number prefix of the modular folder does the ordering.

flaviocopes commented 7 years ago

The modulars of a modular page cannot be reordered in Admin right now, because their order is set by the Modular page. See https://learn.getgrav.org/content/modular

trendschau commented 7 years ago

Just as a visual example for this requirement: I published a new website (planned theme) for grav right now: http://dotheco.de/ The concept is to re-order the modulars on the startpage freely. I know that this is a pretty special concept, but would be totally great, so looking forward to this :-)

OvidiuS commented 7 years ago

would love to have this feature :+1:

patrickbolle commented 7 years ago

This would be great, as well as drag and drop ordering of blog posts.

01Kuzma commented 5 years ago

Hi! Have this been resolved? Or still the modular.md should be edited by hand? P.S. i've tried to change the order in admin turning on the Folder Numeric Prefix, no luck