page
From SkyPHP
Pages on your website are stored in the "pages" folder.
Contents |
Viewing A Webpage
- http://example.com/a --> executes pages/a.php
- http://example.com/b --> executes pages/b/b.php
- pages/b/b.css is auto-linked
- pages/b/b.js is auto-linked
- http://example.com/c.xml --> executes pages/c.xml.php
Note: The ".php" file extension and the "/pages/" portion of the file path are not part of the URL. However, other types of files should referenced as usual, i.e. http://example.com/pages/folder/file.css
Special Types of Pages
- listing page - searchable, sortable, paginated list of records in a table
- profile page - display and/or edit a single recordset
- database folder - dynamic page URLs stored in your database
Automatic Features
The following is done for you before the page executes:
- include all functions & classes
- connect to the database
- start php session
- include all config.php files
- include the page settings file
- user authentication / check page access groups
Sample Page
pages/sample.php
<?
$title = "Page title";
$meta['description'] = "";
$meta['keywords'] = "";
template::inc('website','top');
?>
<h1><?=$title?></h1>
<p>
This is a sample page.
</p>
<?
template::inc('website','bottom');
?>
