aboutsummaryrefslogtreecommitdiffstats
path: root/doc/comanche.bb
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-08-26 13:58:37 -0700
committerredmatrix <mike@macgirvin.com>2016-08-26 13:58:37 -0700
commit86dd67f57da2f36ab4d4706ce0022e0fd4579b76 (patch)
tree80c9f60e4ff96cd3cc2d77249749c37a55b66b14 /doc/comanche.bb
parent8a2b96c2f950f828635441f357acfad94cea1266 (diff)
downloadvolse-hubzilla-86dd67f57da2f36ab4d4706ce0022e0fd4579b76.tar.gz
volse-hubzilla-86dd67f57da2f36ab4d4706ce0022e0fd4579b76.tar.bz2
volse-hubzilla-86dd67f57da2f36ab4d4706ce0022e0fd4579b76.zip
comanche: generalise the conditional variable usage and add $observer as a test. Update comanche doco to reflect recent changes.
Diffstat (limited to 'doc/comanche.bb')
-rw-r--r--doc/comanche.bb51
1 files changed, 46 insertions, 5 deletions
diff --git a/doc/comanche.bb b/doc/comanche.bb
index 6a96d5251..177a4252d 100644
--- a/doc/comanche.bb
+++ b/doc/comanche.bb
@@ -65,17 +65,23 @@ By default, $nav is placed in the &quot;nav&quot; page region and $content is pl
To select a theme for your page, use the 'theme' tag.
[code]
- [theme]apw[/theme]
+ [theme]suckerberg[/theme]
[/code]
-This will select the theme named &quot;apw&quot;. By default your channel's preferred theme will be used.
+This will select the theme named &quot;suckerberg&quot;. By default your channel's preferred theme will be used.
[code]
- [theme=passion]apw[/theme]
+ [theme=passion]suckerberg[/theme]
[/code]
-This will select the theme named &quot;apw&quot; and select the &quot;passion&quot; schema (theme variant).
+This will select the theme named &quot;suckerberg&quot; and select the &quot;passion&quot; schema (theme variant). Alternatively it may be possible to use a condensed theme notation for this.
+[code]
+ [theme]suckerberg:passion[/theme]
+
+[/code]
+
+The condensed notation isn't part of Comanche itself but is recognised by the $Projectname platform as a theme specifier.
[b]Regions[/b]
Each region has a name, as noted above. You will specify the region of interest using a 'region' tag, which includes the name. Any content you wish placed in this region should be placed between the opening region tag and the closing tag.
@@ -164,7 +170,42 @@ The 'comment' tag is used to delimit comments. These comments will not appear on
[comment]This is a comment[/comment]
[/code]
-
+
+[b]Conditional Execution[/b]
+You can use an 'if' construct to make decisions. These are currently based on system configuration variable or the current observer.
+
+[code]
+ [if $config.system.foo]
+ ... the configuration variable system.foo evaluates to 'true'.
+ [else]
+ ... the configuration variable system.foo evaluates to 'false'.
+ [/if]
+
+ [if $observer]
+ ... this content will only be show to authenticated viewers
+ [/if]
+
+[/code]
+
+ The 'else' clause is optional.
+
+ Several tests are supported besides boolean evaluation.
+
+[code]
+ [if $config.system.foo == bar]
+ ... the configuration variable system.foo is equal to the string 'bar'
+ [/if]
+ [if $config.system.foo != bar]
+ ... the configuration variable system.foo is not equal to the string 'bar'
+ [/if]
+ [if $config.system.foo {} bar ]
+ ... the configuration variable system.foo is a simple array containing a value 'bar'
+ [/if]
+ [if $config.system.foo {*} bar]
+ ... the configuration variable system.foo is a simple array containing a key named 'bar'
+ [/if]
+[/code]
+
[b]Complex Example[/b]
[code]
[comment]use an existing page template which provides a banner region plus 3 columns beneath it[/comment]