Editing Templates

You can easily edit the templates that define the look-and-feel of your Tiki.

 Note

Don't confuse these Tiki/Smarty templates (TPL files) with your content templates (that is, pre-defined Wiki, Article, or HTML pages). See Configuring Content Templates for details.

 Tip

Need more information? See "Modifying Templates" in Tiki Essentials for additional details.

  1. On the Customization tab of the Administration: Look & Feel page, enable the Edit Templates and View Templates options.
    File not found.
  2. Click Save. Tiki Saves the information and reloads the page.
  3. In the Editing area, click Edit templates. Tiki lists all of the Smarty templates.
    File not found.
  4. Select a template to edit.
    File not found.

 Tip

If you decide to customize your template files, you should create your own theme instead of changing an existing theme's template files. This will make future Tiki upgrades easier — you don't want to overwrite your customizations each time you upgrade! See "Getting Started on a New Theme" in the Tiki Themes website for details.

Using Tiki's Template Editor

 Warning

Do not use Tiki's template editor to edit header.tpl or any other template file that includes JavaScript. For security, the Tiki template editor will remove all JavaScript from the template files (this is to ensure that a hacker does not inject malicious scripts into your site.




If you accidentally select a file that includes a script element, do not save the template.



To edit a template that uses javascript:

  1. FTP the template file from your web server to your PC.
  2. Edit the template file using a text editor.
  3. FTP the edited template to your web server.

Do you remember the registration page that you completed when creating a new user? You can update the page's template to include a custom message for you website.

 Tip

Use the Smarty template usage indicator option to determin which template to edit. See Modifying Templates in Tiki Essentials for more information.
  1. On the Edit template page, find the tiki-register.tpl file and click the link. Tiki opens the file for editing.
    Edit templates page.
    Edit the registration page and add a customized welcome.
  2. Directly before the <br /> code, type:
    <p>Thanks for registering at my site. I hope you find it useful.</p>


  3. Click save only in the theme: tikineat. Tiki saves the information and reloads the page.

     Note

    If you are using a different theme, its name will appear.

    Edit templates page.
    The registration template now includes your custom message.

 Tip

To facilitate internationalization and translation, you should enclose your text in {tr} ... {/tr} tags. Refer to the Tiki documentation for more information.

 Note

Tiki pages should validate as XHTML 1.0. If you include any markup codes in your templates, be sure it validates correctly. You can use the W3C Validator to check your code.

 Warning

If you include Smarty coding in you templates, it must validate properly, or your pages will not display.


Now log off as the admin and register as a new user. Your custom message is included in the registration page.

Register as a new user
You can customize the Tiki templates as much, or as little, as you desire.




<HR>

Copyright

This guide is based on content originally published by KeyContent.org.

This guide is Copyright (C) 2007-2013, 2019 by Rick Sapir and others under a Creative Commons Attribution-Share Alike 4.0 License. Some rights reserved.

Essentially, you are are free:

Image

to Share — to copy, distribute and transmit the work
Image

to Remix — to adapt the work


Under the following conditions:

Image
Attribution. You must attribute the work to me, as the original licencor, but not in any way that suggests that I endorse you or your use of the work.
Fair attribution includes a return link to http://tikiforsmarties.com (for online use) and mention of primary author (Rick Sapir) and original publisher (KeyContent.org).
Image

Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.


Please read http://creativecommons.org/licenses/by-sa/3.0/legalcode for the full license.

Tiki®, TikiWiki® and the Tiki logo are registered trademarks of the Tiki Software Community Association, used with permission.