A future "comanche UI" is going to need lists of available building blocks. Some of these are pretty easy to assemble, others are a bit more difficult and will have to go through a registration procedure. This checkin create such a registration procedure for page templates and their associated flavours and their assignable regions. The array itself is extensible since I don't know for sure at this stage what the front-end UI for this feature will ultimately require or even if there ever will be a front-end UI as this community still seems to believe that software writes itself and just magically appears, working perfectly.

This commit is contained in:
friendica 2014-04-25 16:09:32 -07:00
parent 14cf9572cd
commit 38301ae1b4

View File

@ -223,3 +223,28 @@ function comanche_region(&$a,$s) {
return $s;
}
/*
* @function register_page_template($arr)
* Registers a page template/variant for use by Comanche selectors
* @param array $arr
* 'template' => template name
* 'variant' => array(
* 'name' => variant name
* 'desc' => text description
* 'regions' => array(
* 'name' => name
* 'desc' => text description
* )
* )
*/
function register_page_template($arr) {
get_app()->page_layouts[$arr['template']] = array($arr['variant']);
return;
}