Smartyでテーブルの隙間を詰める
- <tr>
- [テーブル作成用のループ]
- {assign var='cnt' value=$record|@count}
- {if $cnt%5>0}
- {section name='loop1' start=$cnt%5 loop=5}
- <td> </td>
- {/section}
- {/if}
- </tr>
このくらいが見やすいか… プラグイン作るほどでもないし。
もう少し考えれば if 文を省略できそうな....
追記
http://xfield.info/modules/tautech/category0025.html
便利チップが置いてあるのでメモ。
http://xfield.info/modules/tautech/content0129.html
トリプルクオートってのは初めてみた。
内部的に parse_ini_file() 関数を使ってるならもしかして Zend_Config_Ini でも使えるのかな?