User Tools

Site Tools


creating_and_adding_custom_pages

This is an old revision of the document!


Creating and Adding Custom Pages

This tutorial is about creating and adding custom pages to your Etano site. The tutorial covers 2 scenarios, creating a wide page with no left menu, and creating a page with the left menu.

1. Creating a wide page with no left menu.

You'll need to create three files, a PHP file, an HTML file, and a CSS file.

The PHP file

Open your editor and copy and paste the following code:

<?php
/******************************************************************************
Etano
===============================================================================
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/

require 'includes/common.inc.php';
require _BASEPATH_.'/includes/user_functions.inc.php';
require _BASEPATH_.'/skins_site/'.get_my_skin().'/lang/login.inc.php';

$tpl=new phemplate(_BASEPATH_.'/skins_site/'.get_my_skin().'/','remove_nonjs');

$tpl->set_file('content','mypage.html'); 
$tpl->process('content','content');

$tplvars['title']='My Title'; 
$tplvars['page_title']='My Page Title';
$tplvars['meta_keywords']='your, list, of, keywords'; 
$tplvars['meta_diz']='your page description';
$tplvars['page']='mypage'; 
$tplvars['css']='mypage.css';
include 'frame.php'; 

$tpl→set_file('content','mypage.html');
$tpl→process('content','content');

$tplvars['title']='My Title'; ← adds title to top of browser
$tplvars['page_title']='My Page Title'; ← adds title to top of html page
$tplvars['meta_keywords']='your, list, of, keywords';
$tplvars['meta_diz']='your page description';
$tplvars['page']='mypage';
$tplvars['css']='mypage.css'; ← adds a link to CSS file
include 'frame.php'; ← wraps the html page with the header and footer

Then edit the info shown above in BOLD.

creating_and_adding_custom_pages.1487223387.txt.gz · Last modified: 2017/02/16 05:36 by admin