Home » Support » Help Articles » View in the Batoi OSF

View in the Batoi OSF

Back to Help Articles Home


View refers to part of the application that is responsible for UI. This consists of View Page Parts, CSS files, JS files, and also graphics and multimedia assets of the application. Code for View Page Parts, CSS files and JS files can be created and managed directly through the OSF IDE. However, you can also edit these files in your favourite code editor too.

View Page Parts (VPP) are files which contain UI content consisting of HTML and PHP print statements or simple loops and conditions. They are called Page Parts as one or more such file will create a complete UI that goes to client-side for rendering. These are defined on the OSF IDE while creating or editing events and are available as $APP->VIEWPARTS within the application. The content of VPP can be created and managed directly through the OSF IDE. However, you can also edit these files in your favourite code editor. For example, there are three VPPs which make UI in the default event of index.php Controller (when OSF is installed, these are created to start with):
header-main.tpl.php, hello-world.tpl.php, footer-main.tpl.php
View page Parts are connected to an event on the event definition page on the OSF IDE. In many cases, VPPs are optional, particularly in AJAX requests from UI. In such cases, the data arrays received from Model are returned directly without calling View. Sometimes, one or more VPPs are required even in AJAX calls.

View Page Variables (VPV) are required to define UI pages. This includes page title ($APP->PAGEVARS[TITLE]), page h1 texts ($APP->PAGEVARS[HEADERTEXT]), page breadcrumb ($APP->PAGEVARS[BREADCRUMB]), etc. While the specified three are automatically created when you install the OSF, any other (as required in the scope of your application) can be created on the OSF IDE and be used within the application. You can also include PHP variables within the VPV definition if required.



Updated on Aug 20, 2016

The techReview is an online magazine by Batoi and publishes articles on current trends in technologies across different industry verticals and areas of research. The objective of the online magazine to provide an insight into cutting-edge technologies in their evolution from labs to market.

Visit techReview


English - IN (USD)
New Users? Signup.     Existing Users? Login.