Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 5 matches
Smarty Forum Index
Author Message
  Topic: ADVANCED: Recursion with Smarty
HZiegler

Replies: 155
Views: 823742

PostForum: Tips and Tricks   Posted: Wed Aug 29, 2007 4:31 pm   Subject: ADVANCED: Recursion with Smarty
You can use [url=http://www.phpinsider.com/smarty-forum/viewtopic.php?t=11686]this plugin if you want to make a simple or complex menu. It should be compatible with further smarty versions. I came up ...
  Topic: Split array into same displayed parts
HZiegler

Replies: 6
Views: 44094

PostForum: Tips and Tricks   Posted: Wed Aug 22, 2007 8:18 pm   Subject: Split array into same displayed parts
Ok,


<table><tr>
{section loop=$big_array name=id}
<td>{$big_array[id]}</td>
{if $smarty.section.id.iteration % $parts == 0}
...
  Topic: Multidimensional Array Projection (Recursive)
HZiegler

Replies: 0
Views: 17184

PostForum: Plugins   Posted: Thu Aug 16, 2007 8:38 pm   Subject: Multidimensional Array Projection (Recursive)
This is a quite powerful plugin if you want to use multidimensional arrays in smarty.
I coded it for menu structures, but you can use it for a lot more.

You can save the following code into your s ...
  Topic: Split array into same displayed parts
HZiegler

Replies: 6
Views: 44094

PostForum: Tips and Tricks   Posted: Sun Aug 05, 2007 7:35 am   Subject: Split array into same displayed parts
That still would be
{assign var=parts value=3}
{math equation="ceil(values / parts)" assign=part_items values=$array|@count parts=$parts}

{section name= ...
  Topic: Split array into same displayed parts
HZiegler

Replies: 6
Views: 44094

PostForum: Tips and Tricks   Posted: Sat Aug 04, 2007 9:19 pm   Subject: Split array into same displayed parts
If you want to add something after an amount of array entries, e.g. an image or #top-link or </td><td> etc., you can use the following code.
$part can easily be loaded from settings or gi ...
 
Page 1 of 1
All times are GMT
Jump to:  


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