Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Automatic html table generator

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
GigAHerZ
Smarty n00b


Joined: 22 May 2012
Posts: 1
Location: Estonia

PostPosted: Tue May 22, 2012 6:58 pm    Post subject: Automatic html table generator Reply with quote

Hi!

I've been thinking about having some kind of good way to create html table in smarty templates. Im currently investigating smarty's inner workings, so i would be able to create my on "table" tag, which in some ways acts as foreach loop. I even have a bit of working code already, but it needs some work before i can share it with you.

Syntax for table creation is currently something like this:
Code:
{table from=$aData item=aRow}
 {column title="#"}
  {$aRow.id}
 {/column}
 {column title="Name"}
  {$aRow.name}
 {/column}
{/table}


And by this code i have table and a header with appropriate titles. In future there would also be filters and other stuff like that, but...

But the main question is that do i even have to write something like this? Maybe someone has already written something like this?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP