In the this How-to, we will learn how can we add a new page in Clip bucket script. First let’s see basic addition of new page.
Create php file
First you need to create a php file on root, where index.php is located. Name your php file on your page. For example, if you are making new page for categories, your file name will be ‘categories.php’.
Now open your newly created file and paste following.
Change ‘page_name’ with your original page name. If you go our above example, page_name will be ‘categories’. Let’s break down above code one by one.
This line sets the value of THIS_PAGE to name the of your page. This way you can check if your user is on this page or not.
This line enables us to use all php classes and functions written in Clipbucket.
This line sets the subtitle.
This line put your template file, which we will create in a moment, in an array.
This function is used to display your template file.
Adding HTML File
Our work in php file is done. Now all you have to is create HTML file. HTML file name should be same as provided in template_files() function. This file will be created in your template layout folder. Write some content in it for testing. To access your page, open following in your browser.
Making SEO URL
Now are going to make SEO URL for our new page. This requires adding a new line in your .htaccess file located in root folder. Open your .htaccess and add following line anywhere in it.
RewriteRule ^page_name page_name.php [nc]
Now your page is accessible like this : http://site.com/page_name
This is asked by sixinco. Here is link to topic.