By: UbuNoir
Date: 2004-01-05
Time: 02:02
|
non-existing fields
hello!
I've just started using your templates' system (I had worked much with perl's HTML::Template module before) and I see it has a lot of really nice features.
But I can't get trough one thing:
when I merge records (PHP arrays) with a block, and some of those records hasn't got particular fields (keys) set, then in places like [article.text] I'd really like the template to just output empty string, but instead of it I get "[article.text]". What should I do?
greets
|
By: Skrol29
Date: 2004-01-05
Time: 13:24
|
Re: non-existing fields
Hello,
This is a very specific problem because records should have the same columns.
Nevertheless, you can do the following stuff :
After the merge of the 'article' block, make a new PHP array with only one record with all columns set to empty string.
Then re-merge the 'article block with this array.
Because TBS won't found the block bounds, it will merge only the first record with the entire template.
|