I'm trying to sort custom panel layouts alphabetically however it's not happening.

All my panels start with the same prefixed word followed by an underscore and letter (i.e. layout_a_twocol, layout_b_twocol, layout_c_twocol). I've got about 9 layouts (up to G)) and assumed they'd just sort alphabetically. I've been renaming items to try to grasp how these are sorted but I can't figure out an understandable pattern.

How are panel layouts ordered on the 'Layout' screen?

Comments

bsuttis’s picture

Update: The only way I could get the alphabetical order was to delete each panel and reupload one by one (in order) and then refresh the page.

sdboyer’s picture

The basic logic governing the order in which plugins are loaded is contained in panels_load_includes() in plugins.inc. There are two primary factors that determine the order in which styles are loaded: module weight (which determines hook invocation order), and the logic utilized in drupal_system_listing(). Either way, though, I'm having difficulty imagining the use case that requires three, let alone nine different versions of a twocol layout, so I'm curious - why aren't you using 'flexible'?

bsuttis’s picture

Because each of these 9 layouts is likely going to be used for more than one panel page, and using flexible would require that each one be set up (rows/columns edited) up again and again. Relying on a client to be able to do such a thing instead of simply pick one of 9 pre-designed and styled isn't a possibility.

sun’s picture

Title: Custom layouts ordering on 'Layout' screen » Sort layouts alphabetically
Version: 5.x-2.0-beta3 » 6.x-2.x-dev
Category: support » task

I'd agree that sorting them alphabetically would make sense.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Panels 2 is no longer available and is unsupported. Marking all Panels 2 issues won't fix.