Creating static pages with custom names

15 December 2017 | 29 views | Tags: Documentation

You can create a static page with an arbitrary file name, for example a staff directory called 'staff.php':

  • Create a 'static' content item with the data entry form and take note of its ID number.
  • Make a copy of the file trust_path/extras/type_specific_index_pages/staticpage.php, and place it in your site root. Rename it to suit your needs, for example ‘staff.php’.
  • Edit the file. In the configuration section at the top, set the $id to match the content ID number, specify the theme, target file name (if you are using a different index page for your content) and the page title. For example:
////////// CONFIGURATION //////////

// 1. Enter the ID of the content item you want to display on this page.
$id = 10;

// 2. Enter the name of the page you want headings and tags to link back to, without extension.
$target_file_name = 'index';

// 3. Set the page title.
$tfish_template->page_title = "Staff directory";

////////// END CONFIGURATION //////////

Accessing staff.php will now display the content item associated with $id. Note that static content items do not appear in the main site content stream, so you do not need to worry about duplicate content.

Copyright, all rights reserved.

Related

Tuskfish CMS User Manual

The user manual provides a comprehensive guide to Tuskfish CMS operations. It covers all all aspects from installation to adding and curating content, managing site security and customisation of themes. For additional information on how to customise Tuskfish please see the developer guide.