|
|
Line 276: |
Line 276: |
| | | |
| === ActionApps Categories === | | === ActionApps Categories === |
− | <br />
| + | <aafaq id=1771> ~ToDo:1771 Constants and Categories </aafaq> |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <div class="aafaq" id="faq1771"><aafaq id=1771> ~ToDo: id=1771 Constants and Categories rel:1703,750,278,283,</aafaq>
| |
− | ==== FAQ: Constants and Categories ====
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | | |
− | <br />Some fields have a predefined set of possible values --- a constant group.
| |
− | These are usually shown in a select box, multiple check / radio boxes etc. Edit them in Slice Admin -- Fields -- Constants -- Edit / New.
| |
− | | |
− | <br />Categories
| |
− | are constants with some special properties. The constant table structure is:
| |
− | <pre>
| |
− | <code>
| |
− | CREATE TABLE constant (
| |
− | id char(16) NOT NULL,
| |
− | group_id char(16) NOT NULL,
| |
− | name char(150) NOT NULL,
| |
− | value char(150) NOT NULL,
| |
− | class char(16),
| |
− | pri smallint(5) DEFAULT '100' NOT NULL,
| |
− | PRIMARY KEY (id),
| |
− | KEY group_id (group_id)
| |
− | );
| |
− | </code></pre>
| |
− | <ul>
| |
− | <li><i>group_id</i> is the constant group name</li>
| |
− | <li><i>name</i> is shown on the Add / Edit item page in the select box or other
| |
− | controls</li>
| |
− | <li><i> value</i> is stored in database (table content) and used by slice.php3,
| |
− | view.php3 etc.</li>
| |
− | <li><i> class_id</i> is used only by categories. It is an identifier of some
| |
− | parent - APC wide - category, usefull when importing items between slices.</li>
| |
− | <li><i>pri</i> is the priority used to sort in the select box etc.</li>
| |
− | </ul>
| |
− | <strong>When to use different <em>name</em> and <em>value</em></strong>
| |
− | | |
− | How the 'Display' and the 'Store in Database' parts are supposed to be used?
| |
− | | |
− | <br />For example the "State" select box (if you want to see it on input
| |
− | form) has the names and values of:</p>
| |
− | | |
− | <table align=center cellpadding=3 border=0>
| |
− | <tr><td class=tabtit>Name</td><td class=tabtit>Value</td></tr>
| |
− | <tr><td valign=top class=tabfnc>Approved bin</td><td align=center>1</td></tr>
| |
− | <tr><td valign=top class=tabfnc>Holding bin</td><td align=center>2</td></tr>
| |
− | <tr><td valign=top class=tabfnc nowrap>Trash bin</td><td align=center>3</td></tr>
| |
− | </table>
| |
− | | |
− | <br />Another example, more real-life - colors select box. There can be
| |
− | <em>names</em> of "Red", "blue", "very bright green", ... and <em>values</em> will be
| |
− | "#FF0000", "#0000FF", "#EEFFEE". In input form you see Red...
| |
− | and on page is then #FF0000</p>
| |
− | | |
− | <br />The third example is kind of hint. Suppose you want to have
| |
− | different kinds of item - for example "public", "private", "other" and you
| |
− | want to see this words on compact view. No problem, but you want to see each
| |
− | in different color. So you can define:</p>
| |
− | | |
− | <em>name</em>: Private<br>
| |
− | <em>value</em>: <font color="#FF0000">Private</font>
| |
− | <br>
| |
− | | |
− | <strong>Order Categories on Input Form as You Wish</strong>
| |
− | <br />You can set the priority order in the constant editing page, and then if you want the output in this order as well, then in the View set the sorting to be "Ascending (or Descending) by Priority" </p>
| |
− | | |
− | <strong>Propagate changes into current items</strong>
| |
− | <br />Usually if you change a constant <i>value</i>, the current items in the database remain
| |
− | the same. By checking this box you force the changes to be made on the items
| |
− | too. If you change "red" to "cyan", all items with color
| |
− | "red" will be changed to "cyan".
| |
− | <br />Remember that the constants may be shared by several slices --- if you change
| |
− | a value, the changes may be propagated to some places which you didn't count
| |
− | with. Another danger is that if there were some items with "cyan"
| |
− | before, you can never ever find which item are converted from "red"
| |
− | and which are not.
| |
− | <br />Changing the constant <i>name</i> doesn't have any effect in the database but changes the look
| |
− | in all Edit / New item pages using the constant group.
| |
− | | |
− | <strong>Displaying list of constants on a page</strong>
| |
− | For displaying list of constants on the page you can use specila type of view - <b>Constant view</b>
| |
− | Constant view is quite normal view, just like item listing view. You can use aliases, conditions or sorting (conds[], sort[], als[]) (from AA v2.6). Following table shows aliases, which you can use for the design. Many of the aliases have also its own "<i>field_id</i>", which is presented in the second table column. The "<i>field ids</i>" you can use, if provided aliases do not fill your needs or if you want to use conds[] or sort[].<br>
| |
− | <table border="0" cellspacing="2">
| |
− | <tr><td>_#NAME###_</td><td>const_name</td><td>Constant name</td></tr>
| |
− | <tr><td>_#VALUE##_</td><td>const_value</td><td>Constant value</td></tr>
| |
− | <tr><td>_#PRIORITY</td><td>const_pri</td><td>Constant priority</td></tr>
| |
− | <tr><td>_#GROUP##_</td><td>const_group</td><td>Constant group id</td></tr>
| |
− | <tr><td>_#CLASS##_</td><td>const_class</td><td>Category class (for categories only)</td></tr>
| |
− | <tr><td>_#COUNTER_</td><td> </td><td>Constant number</td></tr>
| |
− | <tr><td>_#CONST_ID</td><td>const_id</td><td>Constant unique id (32-haxadecimal characters)</td></tr>
| |
− | <tr><td>_#SHORT_ID</td><td>const_short_id</td><td>Constant unique short id (autoincremented from '1' for each constant in the system)</td></tr>
| |
− | <tr><td>_#DESCRIPT</td><td>const_description</td><td>Constant description</td></tr>
| |
− | <tr><td>_#LEVEL##_</td><td>const_level</td><td>Constant level (used for hierachical constants). If you want to display hierarchical constants in its hierarchy (so constant on second level have two spaces before the name), you can use following AA expression:<br><code>{switch({_#LEVEL##_})1: :2: :3: }</code></td></tr>
| |
− | </table>
| |
− | | |
− | | |
− | | |
− | </div>
| |
− | ==== FAQ: Constants and Categories ====
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | | |
− | <br />Some fields have a predefined set of possible values --- a constant group.
| |
− | These are usually shown in a select box, multiple check / radio boxes etc. Edit them in Slice Admin -- Fields -- Constants -- Edit / New.
| |
− | | |
− | <br />Categories
| |
− | are constants with some special properties. The constant table structure is:
| |
− | <pre>
| |
− | <code>
| |
− | CREATE TABLE constant (
| |
− | id char(16) NOT NULL,
| |
− | group_id char(16) NOT NULL,
| |
− | name char(150) NOT NULL,
| |
− | value char(150) NOT NULL,
| |
− | class char(16),
| |
− | pri smallint(5) DEFAULT '100' NOT NULL,
| |
− | PRIMARY KEY (id),
| |
− | KEY group_id (group_id)
| |
− | );
| |
− | </code></pre>
| |
− | <ul>
| |
− | <li><i>group_id</i> is the constant group name</li>
| |
− | <li><i>name</i> is shown on the Add / Edit item page in the select box or other
| |
− | controls</li>
| |
− | <li><i> value</i> is stored in database (table content) and used by slice.php3,
| |
− | view.php3 etc.</li>
| |
− | <li><i> class_id</i> is used only by categories. It is an identifier of some
| |
− | parent - APC wide - category, usefull when importing items between slices.</li>
| |
− | <li><i>pri</i> is the priority used to sort in the select box etc.</li>
| |
− | </ul>
| |
− | <strong>When to use different <em>name</em> and <em>value</em></strong>
| |
− | | |
− | How the 'Display' and the 'Store in Database' parts are supposed to be used?
| |
− | | |
− | <br />For example the "State" select box (if you want to see it on input
| |
− | form) has the names and values of:</p>
| |
− | | |
− | <table align=center cellpadding=3 border=0>
| |
− | <tr><td class=tabtit>Name</td><td class=tabtit>Value</td></tr>
| |
− | <tr><td valign=top class=tabfnc>Approved bin</td><td align=center>1</td></tr>
| |
− | <tr><td valign=top class=tabfnc>Holding bin</td><td align=center>2</td></tr>
| |
− | <tr><td valign=top class=tabfnc nowrap>Trash bin</td><td align=center>3</td></tr>
| |
− | </table>
| |
− | | |
− | <br />Another example, more real-life - colors select box. There can be
| |
− | <em>names</em> of "Red", "blue", "very bright green", ... and <em>values</em> will be
| |
− | "#FF0000", "#0000FF", "#EEFFEE". In input form you see Red...
| |
− | and on page is then #FF0000</p>
| |
− | | |
− | <br />The third example is kind of hint. Suppose you want to have
| |
− | different kinds of item - for example "public", "private", "other" and you
| |
− | want to see this words on compact view. No problem, but you want to see each
| |
− | in different color. So you can define:</p>
| |
− | | |
− | <em>name</em>: Private<br>
| |
− | <em>value</em>: <font color="#FF0000">Private</font>
| |
− | <br>
| |
− | | |
− | <strong>Order Categories on Input Form as You Wish</strong>
| |
− | <br />You can set the priority order in the constant editing page, and then if you want the output in this order as well, then in the View set the sorting to be "Ascending (or Descending) by Priority" </p>
| |
− | | |
− | <strong>Propagate changes into current items</strong>
| |
− | <br />Usually if you change a constant <i>value</i>, the current items in the database remain
| |
− | the same. By checking this box you force the changes to be made on the items
| |
− | too. If you change "red" to "cyan", all items with color
| |
− | "red" will be changed to "cyan".
| |
− | <br />Remember that the constants may be shared by several slices --- if you change
| |
− | a value, the changes may be propagated to some places which you didn't count
| |
− | with. Another danger is that if there were some items with "cyan"
| |
− | before, you can never ever find which item are converted from "red"
| |
− | and which are not.
| |
− | <br />Changing the constant <i>name</i> doesn't have any effect in the database but changes the look
| |
− | in all Edit / New item pages using the constant group.
| |
− | | |
− | <strong>Displaying list of constants on a page</strong>
| |
− | For displaying list of constants on the page you can use specila type of view - <b>Constant view</b>
| |
− | Constant view is quite normal view, just like item listing view. You can use aliases, conditions or sorting (conds[], sort[], als[]) (from AA v2.6). Following table shows aliases, which you can use for the design. Many of the aliases have also its own "<i>field_id</i>", which is presented in the second table column. The "<i>field ids</i>" you can use, if provided aliases do not fill your needs or if you want to use conds[] or sort[].<br>
| |
− | <table border="0" cellspacing="2">
| |
− | <tr><td>_#NAME###_</td><td>const_name</td><td>Constant name</td></tr>
| |
− | <tr><td>_#VALUE##_</td><td>const_value</td><td>Constant value</td></tr>
| |
− | <tr><td>_#PRIORITY</td><td>const_pri</td><td>Constant priority</td></tr>
| |
− | <tr><td>_#GROUP##_</td><td>const_group</td><td>Constant group id</td></tr>
| |
− | <tr><td>_#CLASS##_</td><td>const_class</td><td>Category class (for categories only)</td></tr>
| |
− | <tr><td>_#COUNTER_</td><td> </td><td>Constant number</td></tr>
| |
− | <tr><td>_#CONST_ID</td><td>const_id</td><td>Constant unique id (32-haxadecimal characters)</td></tr>
| |
− | <tr><td>_#SHORT_ID</td><td>const_short_id</td><td>Constant unique short id (autoincremented from '1' for each constant in the system)</td></tr>
| |
− | <tr><td>_#DESCRIPT</td><td>const_description</td><td>Constant description</td></tr>
| |
− | <tr><td>_#LEVEL##_</td><td>const_level</td><td>Constant level (used for hierachical constants). If you want to display hierarchical constants in its hierarchy (so constant on second level have two spaces before the name), you can use following AA expression:<br><code>{switch({_#LEVEL##_})1: :2: :3: }</code></td></tr>
| |
− | </table>
| |
− | | |
− | | |
− | | |
− | </div>
| |
| === Hierarchical Constants === | | === Hierarchical Constants === |
− | <br />
| + | <aafaq id=1711> ~ToDo:1711 Using hierarchical constants</aafaq> |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <div class="aafaq" id="faq1711"><aafaq id=1711> ~ToDo: id=1711 Hierarchical constants </aafaq>
| |
− | ==== FAQ: Hierarchical constants ====
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | | |
− | | |
− | <br />What are hierarchical constants? Imagine some keywords allowing to quickly
| |
− | find items of interest --- you have a top-level keyword Country, a first-level
| |
− | keyword United Kingdom and a second-level keyword Leeds. The support has three parts: Editing of the constants and choosing them in the Add / Edit item in AA control panel is described here, <a href="http://actionapps.org/faq/detail.shtml?x=1707">using them in a search form</a> is described elsewhere.</p>
| |
− | <strong>Hierarchical editor</strong>
| |
− | <br />The new hierarchical editor is accessible from the <a href="http://actionapps.org/faq/detail.shtml?x=1771">standard constant editor</a>
| |
− | by the button "Edit
| |
− | in Hierarchical editor". </p>
| |
− | <br />The standard and the hierarchical editor are in some sense interchangeable
| |
− | --- you can edit constants in both and it will not damage the structure.</p>
| |
− | <br />The hierachical editor shows several level boxes. When you choose an item in
| |
− | some level, the next level box will be updated. Because usually the constant
| |
− | Name and Value are the same, there is a check box "Copy value from name"
| |
− | which allows you to only edit the Name box. You can change the editor view by
| |
− | the options at the bottom of the page:</p>
| |
− | <ul>
| |
− | <li>Hierarchical --- uncheck to get back to the standard constant editor, </li>
| |
− | <li>Hide value --- hide the value box, the value will be always copied from
| |
− | the name</li>
| |
− | <li>Levels horizontal --- should the level boxes be organized horizontal or
| |
− | vertical?</li>
| |
− | <li>Level count --- count of level boxes</li>
| |
− | </ul>
| |
− | <br />Changes to the view setting will take effect only after using "Save all
| |
− | changes to database".</p>
| |
− | <strong> Input type "Hierarchical constants"</strong>
| |
− | <br />To take advantage of the constants ordered into a hierarchy, use the "Hierachical
| |
− | constants" input type for a field containing the constants. This view allows
| |
− | the user to go through the constants by level boxes in the same way as in the
| |
− | hierarchical constant editor. The values chosen are filled into a multiple-select-box
| |
− | field. </p>
| |
− | <br />Check the "wizard with help" about parameters. </p>
| |
− | | |
− | | |
− | | |
− | </div>
| |
− | ==== FAQ: Hierarchical constants ====
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | <br />
| |
− | <b>Warning</b>: Unknown modifier 'p' in <b>/data/www/htdocs/actionapps.org/documentation/faq2wiki.php</b> on line <b>63</b><br />
| |
− | | |
− | | |
− | <br />What are hierarchical constants? Imagine some keywords allowing to quickly
| |
− | find items of interest --- you have a top-level keyword Country, a first-level
| |
− | keyword United Kingdom and a second-level keyword Leeds. The support has three parts: Editing of the constants and choosing them in the Add / Edit item in AA control panel is described here, <a href="http://actionapps.org/faq/detail.shtml?x=1707">using them in a search form</a> is described elsewhere.</p>
| |
− | <strong>Hierarchical editor</strong>
| |
− | <br />The new hierarchical editor is accessible from the <a href="http://actionapps.org/faq/detail.shtml?x=1771">standard constant editor</a>
| |
− | by the button "Edit
| |
− | in Hierarchical editor". </p>
| |
− | <br />The standard and the hierarchical editor are in some sense interchangeable
| |
− | --- you can edit constants in both and it will not damage the structure.</p>
| |
− | <br />The hierachical editor shows several level boxes. When you choose an item in
| |
− | some level, the next level box will be updated. Because usually the constant
| |
− | Name and Value are the same, there is a check box "Copy value from name"
| |
− | which allows you to only edit the Name box. You can change the editor view by
| |
− | the options at the bottom of the page:</p>
| |
− | <ul>
| |
− | <li>Hierarchical --- uncheck to get back to the standard constant editor, </li>
| |
− | <li>Hide value --- hide the value box, the value will be always copied from
| |
− | the name</li>
| |
− | <li>Levels horizontal --- should the level boxes be organized horizontal or
| |
− | vertical?</li>
| |
− | <li>Level count --- count of level boxes</li>
| |
− | </ul>
| |
− | <br />Changes to the view setting will take effect only after using "Save all
| |
− | changes to database".</p>
| |
− | <strong> Input type "Hierarchical constants"</strong>
| |
− | <br />To take advantage of the constants ordered into a hierarchy, use the "Hierachical
| |
− | constants" input type for a field containing the constants. This view allows
| |
− | the user to go through the constants by level boxes in the same way as in the
| |
− | hierarchical constant editor. The values chosen are filled into a multiple-select-box
| |
− | field. </p>
| |
− | <br />Check the "wizard with help" about parameters. </p>
| |
− | | |
− | | |
− | | |
− | </div>
| |
| | | |
| == Related Items as Categories == | | == Related Items as Categories == |
| ~ToDo: Write Related Items as Categories | | ~ToDo: Write Related Items as Categories |
ActionApps places all the content into a database. That may be the reason why working with ActionApps resembles working with a database system. With the introduction of "Related Items" at some stage of the development, it had even become a relational database system.
From what we said above comes a (sometimes sad) truth. ActionApps works best when you have a content which leads itself into being stored in a database. That is, in most cases, a significant number of content items, all having the same structure. Imagine news piece, events calendar entry, press release and so on. You have many events but they all can have the same format/structure - headline, short summary, a link for more info, date when it's published:
So we realize that ActionApps like publishing a structured content, so one of the biggest challenges in your data model planning is suggesting a structure that will not create any barriers for publishing the content you want to publish. In ActionApps you use Fields to define the structure. At most cases, the division of a homogeneous content is straightforward. However, these few guidelines may help.
.
Sometimes you simply won't fit all your content into the same structure. You may have News and Events. They share headline and short description. But with events, you need to provide a bit more information, like the location, when does it start, when does it finish, how much is the entry fee.
You could of course use the same slice for both, just by not filling this extra info in for news. But it's not practical - the form for news will be more complicated than it has to be, it will be hard to maintain the distinction between news and events. So in this case, you will probably split your content into two groups (News and Events) and deal with those separately.
The guidelines for deciding about the number of slices you need are not as straightforward as the guidelines for fields.
The advantages are:
You need to assess these pros nad cons carefuly, you need a common sense and a bit of experience here to get it right.
If the content you are publishing is a bit more than just few items, you probably will want to introduce some system for clasification it, and get your content editor to keep doing using it properly.
By clasification we mean a simple thing (at least for start). You have your 1000 news headlines, and you want to put them into few clearly labeled shoe boxes so that you can find them later more easily:
This is a simple taxonomy where each item can belong to exactly one shoebox.
You should foresee how you are going to use this clasification on the web - you create a navigation menu which lists all the categories you have, and by following the link "Health", the visitor will only be presented with the items that relate to Health, not the others.
In the real life, however, things are not as simple. In certain cases, you realize that you can't decide which shoebox to put the item in, is somehow would fit into two or more, depending on the perspective from which you look at it. So you may want to use a slightly different system of clasification, that is put tags on things rather than put things in shoeboxes:
Each item can have an unspecified (i.e. more than one) category tags on itself. The same item will be listed under Sports and under Health (if you create such sections on your website). That is probabaly a desired behaviour.
You may want to go futher and use several systems of categories to clasify your content and combine them. In the following example we are clasifying by topic (i.e. sport, health) which can be a multiple category, and by region - which corner of the world the news came from - which is hopefuly always just one:
All the examples above can be done easily with ActionApps. A little trickier may be the situation when a simple, flat list of categories won't do it for you (or maybe it wil for you but not the peple who use it for clasifying content. What we mean is this very familiar situation:
that is when you need your list of categories to further divide into sub categories and so on.
This is the list of things that need to be taken care of if you use hierarchical categories
Unlike systems where the tree structure of objects is the base of the navigation (e.g. Drupal, Plone), ActionApps puts records upfront and it's support for hierarchical categories is limited.
ActionApps has a simple system for creating and mainataning lists of categories. There is a place in ActionApps user interface where you can define a named (i.e. My_Categories) list of constants, like this:
Once you have the list, you can then use it for creating select boxes and other user controls that allow an editor to assign one or more values from the list. Such a list is referred to by it's name and can be shared among several slices.
Now, if you know relational databases, you'd say that you simply use table for the list of categories, as you do for the content itself. In ActionApps, that's equivalent to saying that the categories should also be stored in a designated slice, not some special internal table, and when one wants to assign a category, simply create a relation between two items in two slices. What is content and what is a category sometimes even depends on the interpretation.
ActionApps allows you to do that too. The topic is described in detail in the Using_Related_Items chapter.
The example below shows the slight difference between what happens when you use ActionApps Categories and when you use slice to store the list of categories:
You have to decide which system you will need in each particular case. Flat systems are simple and you should have no problems with that in ActionApps , even if you use several (multiple) lists of categories.
Hierarchical systems are slightly more complicated and can be achieved throught several different ways, which are all discussed in detail elsewhere
Some fields have a predefined set of possible values --- a constant group. These are usually shown in a select box, multiple check / radio boxes etc. Edit them in Slice Admin -- Fields -- Constants -- Edit / New.
Categories are constants with some special properties. The constant table structure is:
For example the "State" select box (if you want to see it on input form) has the names and values of:
Another example, more real-life - colors select box. There can be names of "Red", "blue", "very bright green", ... and values will be "#FF0000", "#0000FF", "#EEFFEE". In input form you see Red... and on page is then #FF0000
The third example is kind of hint. Suppose you want to have different kinds of item - for example "public", "private", "other" and you want to see this words on compact view. No problem, but you want to see each in different color. So you can define:
You can set the priority order in the constant editing page, and then if you want the output in this order as well, then in the View set the sorting to be "Ascending (or Descending) by Priority"
Remember that the constants may be shared by several slices --- if you change a value, the changes may be propagated to some places which you didn't count with. Another danger is that if there were some items with "cyan" before, you can never ever find which item are converted from "red" and which are not.
For displaying list of constants on the page you can use specila type of view -
Constant view is quite normal view, just like item listing view. You can use aliases, conditions or sorting (conds[], sort[], als[]) (from AA v2.6). Following table shows aliases, which you can use for the design. Many of the aliases have also its own "
", which is presented in the second table column. The "
" you can use, if provided aliases do not fill your needs or if you want to use conds[] or sort[].
What are hierarchical constants? Imagine some keywords allowing to quickly find items of interest --- you have a top-level keyword Country, a first-level keyword United Kingdom and a second-level keyword Leeds. The support has three parts: Editing of the constants and choosing them in the Add / Edit item in AA control panel is described here, using them in a search form is described elsewhere.
The standard and the hierarchical editor are in some sense interchangeable --- you can edit constants in both and it will not damage the structure.
The hierachical editor shows several level boxes. When you choose an item in some level, the next level box will be updated. Because usually the constant Name and Value are the same, there is a check box "Copy value from name" which allows you to only edit the Name box. You can change the editor view by the options at the bottom of the page:
Changes to the view setting will take effect only after using "Save all changes to database".
To take advantage of the constants ordered into a hierarchy, use the "Hierachical constants" input type for a field containing the constants. This view allows the user to go through the constants by level boxes in the same way as in the hierarchical constant editor. The values chosen are filled into a multiple-select-box field.
Check the "wizard with help" about parameters.