Views - Special HTML Tags

Views support various special HTML tags that help provide efficient and streamlined development. All special HTMl tags are prefixed with <a:, such as for example, <a:textbox ... >. Below explains all special HTML tags that are supported.

  1. <a:form>
  2. <a:box>
  3. <a:if>
  4. <a:section>
  5. <a:tab_control>
  6. <a:data_table>


Description: Replaced with a <form> tag, the action being the current view displayed, and method being "POST" by default. No attributes are needed if only pointing the form to the same view being displayed.


Attribute Required Description
action No Only needed if you need the form to point to a different view than the one being displayed, and is the URI relative to the software.
method No Defaults to POST, but change to GET if necessary.
enctype No Defaults to "application/x-www-form".
class No Defaults to "form-inline"
id no Defaults to "frm_main".
file_upload No If set to 1, changes the enctype attribute to "multipart/form-data" to allow for file uploads.

<a:box> ... </a:box> / <a:box_header> ... </a:box_header>

Description: Standard box / panel as used in Bootstrap themes. Used to separate page sections. Used with the <a:box_header title="..."> ... </a:box_header> tags as the title / header element of the box.


    <a:box_header title="Store Details">
        <p>From below you can view and manage all details on the selected store.</p>

    ... contents of box ...

<a:if condition> ... <a:else> ... </e:if>

Description: Allows for conditional HTML to be displayed / hidden as necessary. The condition can be any PHP code you would like, and it will be checked as to whether or not the condition is true or false.


<a:if ~userid~ != 0>
    No menu to display here.

<a:section name="array_name"> ... </a:section>

Description: Will loop through the associative array assigned to the view via the view::assign() method, and will copy the contents between the tags for every array within the array. For example:

Example HTML

<a:section name="posts">
    <p>Published On: ~posts.date_posted~</p><br />


Example PHP


namespace apex;

use apex\app;
use apex\svc\view;

$posts = array(
        'title' => 'Some Title',
        'date_posted' => 'Jan 19, 2019',
        'contents' => 'The post contents'
    ), array(
        'title' => 'Another Post Title',
        'posted_on' => 'Jan 23, 2019',
        'contents' => 'Other post contents'

// Assign template variable
view::assign('posts', $posts);

<a:tab_control> ... </a:tab_control>

Description: Allows you to manually create tab controls within the TPL code.



    <a:tab_page name="General">
        ... contents of tab page ...

    <a:tab_page name="orders">
        ... contents of the tab page ...

    <a:tab_page name="Referalls">
        .. contents of tab page ...


<a:data_table> ... </a:data_table>

Description: A standard data table with header columns, and striped backround colored rows. Generally never needed, as data tables are usually displayed via the a<function> tag.


Attribute Required Description
class No The CSS class name of the data table. Defaults to "table table-bordered table-striped table-hover".
id No The ID# of the table element.