TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

replicate blocks horizontally instead of vertically

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

By: João Gil
Date: 2013-05-31
Time: 18:43

replicate blocks horizontally instead of vertically

Hi, I'm trying to achieve something but i hadn't yet.. and I'm not sure if it's possible..

I'll show you some prints of how I'm trying

This is my template:

![template][1]

and this.. is my result:

![result][2]

Each block is a table, and i want to replicate them like if i had 2 columns, one each side... is that possible?

  [1]: http://i.stack.imgur.com/v56hh.png
  [2]: http://i.stack.imgur.com/I3k9v.png


I'm not sure if the images will stay online(now they are working), but if u cant see them just post.. ill fix it
By: Skrol29
Date: 2013-06-01
Time: 00:30

Re: replicate blocks horizontally instead of vertically

Hi João,

If what you're trying to do is displaying the items on several columns, then TBS has a feature for that : parameter "serial".

Here is an example with an HTML template, but it should work also with DOCX template (I guess this is your template) with "block=tbs:row" instead of "block=tr", and "block=w:tc" instead of "block=td"

http://www.tinybutstrong.com/examples.php?e=prmserial&m=result
By: João Gil
Date: 2013-06-03
Time: 13:43

Re: replicate blocks horizontally instead of vertically

Hi, tks for u help...

but... something it's not working...

my code :

http://s4.postimg.org/70r4r6njh/code.png

my result :

http://s21.postimg.org/5n04k4bmv/result.png

any help?
By: Skrol29
Date: 2013-06-03
Time: 23:39

Re: replicate blocks horizontally instead of vertically

Hi,

"block=tbs:row" is ok, but all the "block=tbs:p" are wrong.
In your serial mode, the sub-block is the cell, not the paragraph.
So there must be only one "block=w:tc" in each cell, on a [base_1] and a [base_2] field.