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?
{DIV(class="clearfix")}
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:
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:
{if $page eq 'WIKI_PAGE_NAME'} <link rel="stylesheet" href="DIRECTORY/FILENAME.css" type="text/css" media="screen" /> {/if}
{NOTE()}The {if} notation is an example of using Smarty and PHP syntax. See Modifying Templates for more information.{NOTE}
Likewise, if you use the Custom CSS tab to include inline styles you can also make those styles conditional:
{if $page eq '''WIKI_PAGE_NAME'''} ... {/if}
{NOTE()}The $page variable works only with wiki pages.{NOTE}