TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

Creating a loop for multi

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Kim
Date: 2016-04-22
Time: 19:21

Creating a loop for multi

Hi,
Thanks in advance for the nice library.

I've got an use case which I can find a solution with tbs on my own.

I have a book cover template which works fine when rendering a single instance. But my users want to be able to print all the book covers of students in bulk. But I can't solve that request right now.

My template look like this
==================
LOGO University (Header)
==================
--------------------------------
TextBox 1 (fixed positioning)
[onshow.student]
[onshow.course]
[onshow.year]
--------------------------------
TextBox 2 (fixed positioning)
[onshow.title]
--------------------------------
TextBox 3 (fixed positioning)
[onshow.department]
--------------------------------
==================
UNIV. INFO FOOTER
==================

I tried some Mergeblock setups but no luck.

Suggestions?
By: Skrol29
Date: 2016-05-05
Time: 23:27

Re: Creating a loop for multi

Hi Kim,

You should use a block, that's what they are for.
Instead of merging simple data items, you merge records.

You can the the in-line examples.