Documentation

Features

Differences

This shows you the differences between the selected revision and the current version of the page.

templates:guide 2008/08/26 09:50 templates:guide 2008/08/26 09:56 current
Line 25: Line 25:
Once you get the file name you can then copy that file out of the default template folder and move it into your new folder. Once you get the file name you can then copy that file out of the default template folder and move it into your new folder.
-68 Classifieds works by using two template paths. The one you have defined and the default. So if it can find a file in your template folder it will use the default.+68 Classifieds works by using two template paths. The one you have defined and the default template folder. So if it can't find a file in your template folder it will use the default. **Please Note:** This only applies to .tpl files. Images and/or other files will not be picked up unless specifically referenced.
-You can find a great tutorial for creating templates at our user forums. +** Reference ** 
 +  * [[http://www.68classifieds.com/forums/showthread.php?t=4559|Modifying the default template in v4 pdf guide]].  
 +  * [[http://smarty.net/crashcourse.php|Smarty Crash Course]] 
 + 
 +===== Conditional Tags ===== 
 +The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches. For example, you might want to welcome a logged in site visitor with a nice friendly greeting. 
 + 
 +<code>if $smarty.session.username<>""} Welcome back {$smarty.session.username} {/if}</code> 
 + 
 +That may look pretty complex but actually it is very simple once you get your head around. The first portion ''{if $smarty.session.username<>""}'' checks to make sure they are logged in and their username is not blank. Next the welcome back portion just prints their name if the first condition is true. 
 + 
 +** Reference **  
 +  * [[http://www.68classifieds.com/blog/stepping-into-smarty-conditionals/|Stepping into Smarty Conditionals]]

Have more questions? Visit our community forums.