I'm trying to build a small website using the Flight php framework. The goal is to have a clear framework using various views.
Until this point everything is working fine, I managed to build a nice framework.php and an content, menu and header view
Flight::render('header', array('heading'=> $page_title), header_content');
Flight::render('menu', array('type'=> 'main menu'), mainmenu_content');
Flight::render('body', array(), 'body_content');
Flight::render('layout', array('title' => 'Home Page'));
the content is build up of multiple sections (articles) which all have the same layout, now I would like to again use the Flight views to generate those sections. using the following code I can create on section and pass it trough to the 'body'
Flight::render('section', array('id' => $id), 'section_content');
what is the best solution to add multiple sections to one page?
I've tried to get, in the index.php, the value of $section_content, as variable and using Flight::get('section_content'). both without success. running the Flight::render twice will overwrite the value of $section_content (as expected). Also tried to use an array for $section_content, also without success.
Of course I can find numerous work-around solutions but I'm not going to use them until I'm certain what I want is relay impossible.
While you must all section define, you last define your layout render. Like this;