AEM page rendering sequence
Can someone detail the sequence that AEM uses to render pages? For instance, if there are multiple components on the page, how does AEM decide which component to render first? Is there any way to control the order in which components are rendered? I'd imagine that the template is processed first, then the header, footer, content, and other page components in a typical page hierarchy, then the components are rendered next??? Is this correct? If not, please lay out the sequence step by step and/or point me to the appropriate documentation, (though I've not seen this documented in the AEM documentation). I'm primarily interested in doing this for AEM 6.1, but if there is a significant difference for 5.6.1, please call out the differences.