The Hubzilla
|
Comanche Page Description Language. More...
Public Member Functions | |
parse ($s, $pass=0) | |
parse_pass0 ($s) | |
parse_pass1 ($s) | |
get_condition_var ($v) | |
Replace conditional variables with real values. More... | |
test_condition ($s) | |
Test for Conditional Execution conditions. More... | |
menu ($s, $class= '') | |
Return rendered menu for current channel_id. More... | |
replace_region ($match) | |
get_channel_id () | |
Returns the channel_id of the profile owner of the page. More... | |
block ($s, $class= '') | |
Returns a parsed block. More... | |
js ($s) | |
Include JS depending on framework. More... | |
css ($s) | |
Include CSS depending on framework. More... | |
webpage (&$a, $s) | |
widget ($name, $text) | |
Render a widget. More... | |
region ($s, $region_name) | |
register_page_template ($arr) | |
Registers a page template/variant for use by Comanche selectors. More... | |
Comanche Page Description Language.
Comanche is a markup language similar to bbcode with which to create elaborate and complex web pages by assembling them from a series of components - some of which are pre-built and others which can be defined on the fly. Comanche uses a Page Decription Language to create these pages.
Comanche primarily chooses what content will appear in various regions of the page. The various regions have names and these names can change depending on what layout template you choose.
Zotlabs\Render\Comanche::block | ( | $s, | |
$class = '' |
|||
) |
Returns a parsed block.
string | $s | |
string | $class | (optional) default empty |
Referenced by Zotlabs\Render\Comanche\region().
Zotlabs\Render\Comanche::css | ( | $s | ) |
Include CSS depending on framework.
string | $s |
Referenced by Zotlabs\Render\Comanche\region().
Zotlabs\Render\Comanche::get_channel_id | ( | ) |
Returns the channel_id of the profile owner of the page.
Returns the channel_id of the profile owner of the page, or the local_channel if there is no profile owner. Otherwise returns 0.
Referenced by Zotlabs\Render\Comanche\block(), and Zotlabs\Render\Comanche\menu().
Zotlabs\Render\Comanche::get_condition_var | ( | $v | ) |
Replace conditional variables with real values.
Currently supported condition variables:
string | $v | The conditional variable name |
Referenced by Zotlabs\Render\Comanche\parse(), and Zotlabs\Render\Comanche\test_condition().
Zotlabs\Render\Comanche::js | ( | $s | ) |
Include JS depending on framework.
string | $s |
Referenced by Zotlabs\Render\Comanche\region().
Zotlabs\Render\Comanche::menu | ( | $s, | |
$class = '' |
|||
) |
Return rendered menu for current channel_id.
string | $s | |
string | $class | (optional) default empty |
Referenced by Zotlabs\Render\Comanche\block(), and Zotlabs\Render\Comanche\region().
Zotlabs\Render\Comanche::parse | ( | $s, | |
$pass = 0 |
|||
) |
Zotlabs\Render\Comanche::parse_pass0 | ( | $s | ) |
Referenced by Zotlabs\Render\Comanche\parse().
Zotlabs\Render\Comanche::parse_pass1 | ( | $s | ) |
Referenced by Zotlabs\Render\Comanche\parse().
Zotlabs\Render\Comanche::region | ( | $s, | |
$region_name | |||
) |
Referenced by Zotlabs\Render\Comanche\parse_pass1().
Zotlabs\Render\Comanche::register_page_template | ( | $arr | ) |
Registers a page template/variant for use by Comanche selectors.
array | $arr | 'template' => template name 'variant' => array( 'name' => variant name 'desc' => text description 'regions' => array( 'name' => name 'desc' => text description ) ) |
Zotlabs\Render\Comanche::replace_region | ( | $match | ) |
Zotlabs\Render\Comanche::test_condition | ( | $s | ) |
Test for Conditional Execution conditions.
This is extensible. The first version of variable testing supports tests of the forms:
The values 0, '', an empty array, and an unset value will all evaluate to false.
int | string | $s |
Referenced by Zotlabs\Render\Comanche\parse().
Zotlabs\Render\Comanche::webpage | ( | & | $a, |
$s | |||
) |
This doesn't really belong in Comanche, but it could also be argued that it is the perfect place. We need to be able to select what kind of template and decoration to use for the webpage at the heart of our content. For now we'll allow an '[authored]' element which defaults to name and date, or 'none' to remove these, and perhaps 'full' to provide a social network style profile photo.
But leave it open to have richer templating options and perhaps ultimately discard this one, once we have a better idea of what template and webpage options we might desire.
[in,out] | array | $a | |
string | $s |
Referenced by Zotlabs\Render\Comanche\parse_pass0().
Zotlabs\Render\Comanche::widget | ( | $name, | |
$text | |||
) |