if( isDefined( "session.rootMenu" )) { bindStandardPortlets(); } ---> includeTemplate( attributes.display, attributes.templatePath ); ArrayAppend( newFlex, attributes.flex ); if( _p.sortRank gte 0 or ArrayLen( attributes.flex ) eq 0) { ArrayAppend( attributes.flex, _p); } else { ArrayInsertAt( attributes.flex, 1, _p); }