NAMESPACE: packages/actionMexample/Views
Pagetwo extends View
$components | namespace | Access your components through this variable. Built-in components can be accessed also directly from the view, but your custom components always through this object. |
$theme |
View will always need to have a function called tab1. View can include up to five tabs, named simply tab2 etc. Advantage with tabs are, that all tabs are loaded when action is updated, so you can navigate between tabs without doing any refreshes. To navigate to another tab, define OnClick in the following way: $this->getOnclickTab(2);
View should always return a class, with at least one of these defined: $this->layout->header[] $this->layout->scroll[] $this->layout->footer[] $this->layout->onload[] $this->layout->control[]Each of these sections must be an array and the array can only include objects. Be careful with types, returning any other types will throw an error in the client.
Model passes the fields that are configured using the webform (simple checkbox whether they are enabled or not) and adds them directly on the $this->layout->scroll[].
$field |
Its recommended to separate your main views to different files for better code organization, debugging and re-usability. Your view can extend the main view file if you use shared functions in several of your views or it can extend directly Bootstrap/Views/BootstrapView.In this view, we use divider and top shadow from the main view. Note, that if you are exending the main view, and your main view includes additional tabs or divs, it can add to unneccessary payload.