php-web-developer.net banner
Home · Smarty
topleft   topright
Your Ad Here

Smarty : Quick Install

This is a simple guide to get Smarty setup and running quickly. The online documentation includes a very thorough explanation of a Smarty installation. This guide is meant to be a quick and painless way of getting Smarty working, and nothing more. The guide assumes you are familiar with the UNIX system environment. Windows users will need to make adjustments where necessary.

http://www.smarty.net/quick_start.php

Comments (0) 19.04.2008. 13:46

Automatic Column Layout in Smarty

Simple Solution for any number of columns
This is for any number of columns, and its short and painless:
{assign var="cols" value="4"} {* change here for coumns count *}
{* $cols is the number of columns you want *} <TABLE border=1>
<TR>
{section name=numloop loop=$data}
<TD>{$data[numloop]}</TD>
{* see if we should go to the next row *}
{if not ($smarty.section.numloop.rownum mod $cols)}
{if not $smarty.section.numloop.last}
</TR><TR>
{/if}
{/if}
{if $smarty.section.numloop.last}
{* pad the cells not yet created *}
{math equation = "n - a % n" n=$cols a=$data|@count assign="cells"}
{if $cells ne $cols}
{section name=pad loop=$cells}
<TD>&nbsp;</TD>
{/section}
{/if}
</TR>
{/if}
{/section}
</TABLE>

Comments (0) 16.04.2008. 18:36

Your Ad Here
topleft topright
topleft Spread the word! topright
Subscribe Blog Subscribe to this site
Bookmark and Share
eXTReMe Tracker
Subscribe via EMAIL
We respects your privacy. We never sell, rent, or trade your email address to other companies.

topleft topright
 
topleft Sponsors topright
Webmasters-Directory



ADVERTISE HERE
topleft topright
 
topleft Sponsors topright
banner
banner
banner
banner
banner
banner
topleft topright
topleft Search topright

topleft topright
 
topleft Categories topright
topleft topright
 
topleft Why this Site? topright

Why This Site?

Web-developers have written many articles about php,ajax,css,javascript,dhtml and DOM, and developed many useful techniques, which can save you a lot of time - of course, if you are able to find them in time.Here in this site you will find a list of techniques we , as web-architects, really could not live without. They are essential and they indeed make our life easier. Let's take a look at all category techniques you should always have ready to hand if you develop web-sites.
topleft topright
 
topleft Latest Articles topright
topleft topright
 
topleft Site Promoters topright
Webmaster Directory,forum,php stuffs,free stuffs and webmaster resources.
topleft topright
 
topleft Share this widget!! topright
topleft topright
Copyright Tutorials,tips,trics,bookmarks,articles and techniques about php,mysql,ajax,css,javascript,dhtml and DOM | php-web-developer.net - © 2008 RSS Articles RSS Comments sNews