City Guides  ::   Expat Blogs  ::   Travel Expat  ::   Expat Interviews  ::   Expat Banking
  Blog in English
 
 
 Expat News Main
 Photo Albums
 Contact
 
 Categories
International News [18]
Expat Trends [31]
Moving Abroad [27]
Housing [3]
Work & Business [11]
Lifestyle [23]
Education [10]
Health [6]
Finance [22]
Entertainment [51]
Repatriation [4]
EasyExpat News [58]
BlogExpat News [21]
Expat tweets [43]
 
 Archives
 
 Links
Our expat blogs
- American Expats in the News [EN]
- Expat Interviews [DE] [EN] [ES] [FR] [IT]
- Expat News [EN]
- Chroniques d'expatriation [FR]
Our expat sites
- EasyExpat.com
- BlogExpat.com
- ExpertExpat.com
 

Template Packages   How to add an image in the...

How to write smarty code and modify the templatesHow to write smarty code and modify the templates

EasyExpat EasyExpat  Date 01 August, 2005 19:20

A good starting point to learn about Smarty is their crash-course: http://smarty.php.net/crashcourse.php Or if you want more details, a very nice manual is also available: http://smarty.php.net/manual/en/

We give you an example of the template code, in header.template of the easyexpat template:

=============

<tr><td class="orange">{$locale->tr("recently";)}</td></tr> {foreach from=$recentposts item=recentpost} <tr class="{cycle values="odd,even"}"><td><a title="{$recentpost->getText()|truncate:150:"..."|strip_tags|escape}" href="{$url->postLink($recentpost)}">{$recentpost->getTopic()}</a><br/> {/foreach}</td></tr>

=============

Here we display all the recent posts. We use truncate to put only the begining of the post. You could also use capitalize to make upper case. You can use plenty of other variables, the list is here.

You can also sort differently the arrays (list of post, messages...) inside the templates by using the method described here: Sorting arrays inside templates.

If you are looking for more help on EasyExpat's blogs, do not forget that we have a dedicated forum.

 

   



Add this RSS to Yahoo!    Add this RSS to Google    Add this RSS to Netvibes    Add this RSS feed to your favorites on Technorati

         
         EasyExpat on

 
 
Calendar
« August 2005 »
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 
 
 
 
 
Syndicate
RSS
 
Easy Expat: Guide for expatriates    Blog for Expatriates, Moving Abroad
 


Copyright EasyExpat Ltd © All rights reserved.

Look for more information with dotExpat network:
Easy Expat  -  Blog Expat  -  EasyExpat Travel  -  Expert Expat
Blog powered by LifeType -  Designed by EasyExpat

Guide for Expatriate Expatriation - International Relocation Portal: Move, Work, Live Abroad
Deutsch  -  English  -  Español  -  Français  -  Italiano  -  Nederlands  -  Polski  -  Português  -  Русский