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:
parent
14cf9572cd
commit
38301ae1b4
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user