Panels should be genereated in order of appearance. Instead, they are generated in alphabetical order. Sometimes other modules/themes may depend on nodes being generated in order of appearance and this gotcha should be closed.

Comments

merlinofchaos’s picture

I don't understand what you're saying.

Are you talking about the panels administration page? (admin/build/panels) They are in alpha order there to make it easier to find. They are not nodes; there isn't a way for another module to really link into this page, either, so I don't understand what other dependency there might be there.

rgladwell’s picture

Sorry, for not being clear: the panels module seems to pre-generate panel layouts before spitting out the HTML to display. Each panel's output is generated, not in the order it is displayed (top panel first, etc.), but in alphabetical order of the panel ID as defined in the 'content areas' variable from the *.inc panels_layouts() function.

For example:

    'content areas' => array(
      'top' => t('Top'),               /// generated last
      'left' => t('Left side'),         /// generated second
      'right' => t('Right side'),     /// generated third
      'bottom' => t('Bottom')       /// generated first
    ),
rgladwell’s picture

This might be important, for example, for a theme that displays the first node/element/whatever on a page differently from the rest and relies upon nodes being generated in order.

catch’s picture

Status: Active » Closed (fixed)

I doubt this is still an issue, but please re-open if it is.