Comdev - PHP Scripts For Your Website
Fast Website Development with PHP Components

Modules Builder > Using Page Object

Add Record List/Edit/Delete Menu Label Record Display Form Submission

Using Record Display Page Object

Below are the tutorials for creating front-end page and its functionality using 'Record Display' page object. Let's say, you've created a PC Catalog module and you wish to create a page to showcase your entire products information on your website.

Create Page Object

  1. Login to your One Admin area and click on the 'PC Catalog' in the module's pane to run module through back-end system. Otherwise, click on the Pro button in the One Admin panel to access Modules Builder Pro and create 'PC Catalog' module.

  2. Once you have completed step 1, proceed to module's Launch Builder and a page similar to above will prompt out. On this page, select Front-End design area and create a form using 'Record Display' page object.

  3. Name this page as 'Product Listing', select the existing 'Data' source name (Table's name in the database) in order to select the fields name that you wish to retrieve from the database and display them online.

  4. Define number of columns per row and number of records per page. If you check the 'Navigator' option box, you're able to browse the entire records easily. Check the 'Search' option to allow you to search records.

Using Simple SQL Wizard

  1. Use Simple SQL Wizard to define your records selection from the database or enter your own SQL Clause to retrieve your records selection from the database.

  2. If you are new with SQL, you can click on the checkbox to select available fields in your database and define your records selection. Let's say, you wish to display a specific data, e.g. name. Therefore, add condition to this field on how you want it to display on your web page.

  3. Alternatively, you can modify SQL clause to retrieve records from database if you are familiar with SQL query. For your references, click on a list of fields available and view all data source tables.

    Tips :

    1. There is no need to add ' ; ' at the end of your SQL Query.
    2. Important : To ensure the validity of your SQL Query, you need to update the SQL Query whenever you have modified the fields or made changes to the current table.

Design Block

  1. Each record is displayed using a display block. A display block is a collection of HTML codes which will generate repeatedly to display the results.

  2. Click on the Design Block tab to create your own display layout using HTML editor where you can personalize font colors, insert images and hyperlinks, create tables, etc.

  3. In helping you to design, click 'Click here for a list of variables' and a page will prompt out. You can also build your own 'Custom Variables' such as using the SQL variables and combine them with additional image and anchor tags.

    Tips : Create a new / custom variable to display image.

    1. Assume the existing variable of image in the Design Block is Photo: {photo}
    2. Insert values as following:
      New Variable: photo_image
      Existing Variable: photo
      When value exists: <img src="{file_path}/{photo}">
      When value doesn't exist: <img src="image/no_pic.gif">
    3. Replace the {photo} with {photo_image} in the Design Block, e.g: Photo: {photo_image}

  4. Click on the 'Add' button to add image variables into your block or click 'Delete' to remove them directly.

Insert/Edit Links

  1. To insert/edit links on your product display page, click on the Design Block tab.

  2. In the HTML editor, select the existing variables and click on the 'Insert/Edit Link' icon in the toolbar. Then, enter a complete URL, e.g. 'pccatalog.php?category_id = {id}' or browse through your server. Click on the 'OK' button once you're done.


'Modules Builder Pro' will automatically generate the inclusion code for all the front end's page objects. Copy and paste the codes into a .php file of your client's web page and start running your 'PC Catalog' system.

Back to the top