From 38301ae1b40d52047921508ca12ff3381bddcff4 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 Apr 2014 16:09:32 -0700 Subject: 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. --- include/comanche.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/comanche.php') diff --git a/include/comanche.php b/include/comanche.php index 13146ded4..b0eac475d 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -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; +} + + + + -- cgit v1.2.3