Need a Developer?
Taking work, any size or scope, and your imagination is the only limit. Contact me for a free consultation at [email protected].
ERROR: TESTING The special HTML tag 'theme section="whats_new.tpl"' is not supported.
Subscribe to the low traffic mailing list to stay updated on Apex.
Apex Training - Admin Settings View
Within our /etc/training/package.php file, we defined a Settings->Lottery menu within the administration panel, to allow the administrator to define the daily lottery award. Let's go ahead and develop that menu, so within terminal type:
This will create two new files at:
Open the new file at /views/tpl/admin/settings/lottery.tpl and enter the following contents:
This defines a simple page, with one container / panel that contains one form with a single textbox allowing the administrator to define the daily lottery award. As you still notice, the UTI within your web browser when visitng the menu is /admin/settings/lottery, which is the same as the file location on the server. For more information on the .tpl files and speical HTML tags, please visit:
Every view also has an associated .php file that is executed upon viewing the page. Open the file at /views/php/admin/settings/lottery.php, and enter the following contents:
This is a simple PHP file that simply checks the app::get_action() method to see whether or not the submit button was pressed, and if so, updates the one configuration variable via the app::update_config_var() method.
Before we quickly develop the other two views for the menus we defined, let's first Create the Data Table that will be displayed on those pages.