Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Template Tricks


About

Below, we will document some little template tricks. Typically show content depending on something. Can be done directly in templates/*.tpl files or in Admin > Look & Feel.

Custom CSS and JS

Starting in Tiki5, in Admin > Look & Feel (tiki-admin.php?page=look) > Miscellaneous, there is a Custom Code section to add custom CSS and JavaScript.

You can create styles/custom.js or styles/yourtheme/custom.js and that should get included automatically. You may need to empty your Tiki cache.

Change size of subtitle

custom CSS
#sitesubtitle {
font-size: 24px;
}




Help, I broke my theme !

Apparently, a problem with my custom theme is preventing me from accessing my site normally.

Reset the theme "manually": If you can't access the admin pages to set your site's theme back to one that is known to work, you can reset the theme from the back end, so to speak.

Database method: Use phpmyadmin on your server to access your Tiki database. In the table "tiki_preferences", find the row for "site_style". Edit this row by replacing the custom theme name with a standard theme, such as thenews.css.

FTP method (easier): Using your FTP client, go to the styles directory of your Tiki installation and rename the theme currently set as the site theme, such as by changing its ".css" file extension to ".txt". Tiki will revert to the default. Log in using the default theme and fix what is wrong. Also clear the site caches.

When trying out a new theme, it is much better to use the "switch theme" module to select it. Don't make a new and untried theme the site theme without first trying it out from the switch-theme module.

I am stuck in a theme

To change themes, you can point your browser to a non faulty theme:
  1. Point your browser to: tiki-switch_theme.php?theme=fivealive.css
  2. Then, also check to Clear the cache with tiki-admin_system.php?do=all

If anything doesn't change

For some unknown reason the theme doesnt change. Look directly in the database in 'tiki_preferences' look at:
UPDATE
  `tiki_preferences` 
SET
  `value` =  'fivealive.css' 
WHERE
  `tiki_preferences`.`name` =  'style';


Howto

Adding a print button only if current page is a wiki page

{if $page neq ''}	
 <a title="{tr}Print{/tr}" href="tiki-print.php?page={$page|escape:"url"}">
  <img src="pics/icons/printer.png"/>{tr}Print{/tr}
 </a> 
{/if}


Adding some HTML (ex.: a logo) to the print version of wiki pages

Admin -> Look and Feel -> Customization -> HTML
{if $SCRIPT_NAME eq '/tiki-print.php'}
<img src="img/tiki/Tiki_WCG.png" alt="Site Logo" style="border: none">
{/if}




Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other big news!
Contribute to Tiki

Theme: Fivealive

Shoutbox

andi6803, 12:20 GMT, Tue 18 of Oct., 2011: I use tiki 6v4 with the Milkyway theme. But it's not possible to switch on the search bar at the top bar. With other themes it works.
chibaguy, 02:30 GMT, Mon 08 of Aug., 2011: (con't). It's inherited from design.css and is white.
chibaguy, 02:15 GMT, Mon 08 of Aug., 2011: freeman57, I'm not seeing the text/background color problem (I'll keep checking, though). Here I see black text on a white bg in the file gallery popups. The bg color is set by CSS class "opaque" which Milkway doesn't have a value for; it's imported fro
chibaguy, 02:14 GMT, Mon 08 of Aug., 2011: That's right , freeman57, (about the Milkyway menu). The info is on the Milkway page here, for anyone looking for it.
freeman57, 18:58 GMT, Fri 05 of Aug., 2011: Also the fgal popup in MilkyWay uses the theme background colour an is unreadable with blue or black selected