Now, updating for Tiki 9! Get Smart...
Now accepting new user registrations! Become a contributor.
| More
Join Print Print multiple pages Convert to PDF

Customizing Per Page


Previously, you saw how to add new CSS styles to Tiki. While this method works well, it can add additional "overhead" to your site: Why load all those custom styles, if you only need to use them on specific pages?


9.xIf you included a custom CSS file in the Custom HTML Content area on the Customization tab of the Admin: Look and Feel page, you can tell Tiki to only load the file for a specific page:

Admin: Look and Feel
Adding a CSS file


8.x & 7.x

If you included a custom CSS file in the Custom HTML Content area on the Customization tab of the Admin: Look and Feel page, you can tell Tiki to only load the file for a specific page:

Admin: Look and Feel
Adding a CSS file


6.x
If you included a custom CSS file in the Custom HTML Content area on the General Layout Options tab of the Admin: Look and Feel page, you can tell Tiki to only load the file for a specific page:

Admin: Look and Feel
Adding a CSS file



Including a CSS file
{if $page eq 'WIKI_PAGE_NAME'}
    <li<x>nk rel="stylesheet" href="DIRECTORY/FILENAME.css" type="text/css" media="screen" />
{/if}

NoteNote:
The {if} notation is an example of using Smarty and PHP syntax. See Modifying Templates for more information.


Likewise, if you use the Custom CSS tab to include inline styles you can also make those styles conditional:
Including a CSS file
{if $page eq 'WIKI_PAGE_NAME'}
     ...
{/if}


NoteNote:
The $page variable works only with wiki pages.




Contributors to this page: Rick Sapir .
Page last modified on Thursday, April 05, 2012 10:29:32am EDT by Rick Sapir.
The content on this page is licensed under the terms of the Copyright Information.

Buy the Books

Tiki Essentials & Tiki for Smarties -- Buy the Books.
Available from Amazon, LuLu, and more as paperback or ebook...

What do you think?

What do you think of this project?



Anti-Bot verification code image Try another code



View Results
(Votes: 20)

"Very useful and [well] organized..."

Is Essentials helpful?

Essential Readers



Advertising



Powered by Tiki Wiki CMS Groupware
Creative Commons Copyright. Some rights reserved.
Tiki Essentials (this site) is © 2011-2012 by Rick Sapir, published by KeyContent.org, and is licensed
under a Creative Commons Attribution-Share Alike 3.0 United States License. Some rights reserved. Privacy Policy.
Permissions beyond the scope of this license may be available at http://twessentials.tikiforsmarties.com/Copyright Information.
Questions, comments, or concerns about this site or the guide? Let me know.
New to Tiki? Try Tiki for Dummies Smarties: A beginner's guide to using Tiki Wiki CMS Groupware.


Feedback Form
Feedback Analytics