diff options
author | friendica <info@friendica.com> | 2014-04-25 16:09:32 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-04-25 16:09:32 -0700 |
commit | 38301ae1b40d52047921508ca12ff3381bddcff4 (patch) | |
tree | 7079c96edd2147c9506ca2fac648215139d3f077 /include/comanche.php | |
parent | 14cf9572cd69cc217571c0a596aa6c4fb34eff7f (diff) | |
download | volse-hubzilla-38301ae1b40d52047921508ca12ff3381bddcff4.tar.gz volse-hubzilla-38301ae1b40d52047921508ca12ff3381bddcff4.tar.bz2 volse-hubzilla-38301ae1b40d52047921508ca12ff3381bddcff4.zip |
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.
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 25 |
1 files changed, 25 insertions, 0 deletions
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; +} + + + + |