Search code examples
apostrophe-cms

How to sort the list of widgets?


I would like to manage the order of the widgets, in the same way that you can manage the administration bar with the module "apostrophe-admin-bar".

I have seen that in the demo of the museum there is this option:

enter image description here

But looking at the code, I haven't figured out where it's done.

How can I add this option?


Solution

  • The order of the widgets in the menu is the order in which you pass them to apos.area. If you're referring to putting them in columns, that is a project-level CSS override, you can find that here

    CSS https://github.com/apostrophecms/apostrophe-open-museum/blob/master/lib/modules/apostrophe-assets/public/css/utils/_admin.less#L1-L15

    Area wrapper https://github.com/apostrophecms/apostrophe-open-museum/blob/master/lib/modules/apostrophe-pages/views/pages/default.html#L27