gomymobi.com: Knowledge Base
How to create a frontpage
What is a Frontpage?
- Frontpage is a set of files that used to serve your homepage, you may also call it as homepage theme.
- Unlike website themes, homepage is the place to show many important details of system, so Frontpage is a set contains both PHP files and static files; so can not edit it online, and only administrators can manage Frontpages of system.
- In this tutorial, we will show you the basic steps to create a Frontpage.
Structure of a Frontpage
- frontpage-settings.php (required)
- index.php (required)
- preview.jpg (optional)
- First rule for zipped Frontpage file is all files & folders must be at root of zipped file, not at any sub-level.
- Second, you may have unlimited files and folder in a frontpage package, but
index.php are required files. These only files shall be loaded whenenver any page of homepage browsed. You will process and handle all things in this file to serve visitors.
- You may consider a Frontpage like a mini PHP script, you may also use any material, any resource and any framework, such as Lavarel or Zend, to build your Frontpages. Just use like you want and build as you wish.
- But we also recommend you to use our built-in resources to build faster, our resources almost coded line by line for the system, so it gives the best performance & speed for your website.
Optional variables in frontpage-settings.php
Usable global variables and functions
- There are few variables and functions should use to create a frontpage.
CAUTION we use pTemplate for templating all static HTML files. But you may also use plain PHP code to retrieve these variable values by alternative functions.
- In order to access a plan property, we already defined some static variables