Categories > TinyButStrong general >

HTML formatting

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Philippe
Date: 2008-03-11
Time: 11:29

HTML formatting

Is there a way to get the result of a blockmerge to have nice html formatting ? That way the source of the page is easier to read.

When I use this in my template :

<option value="[companySlct.FINMMR;block=option]">[companySlct.FINAAL;block=option]</option>

The result is I have all the options on one line, instead of every option on a seperate line.

By: ege
Date: 2008-03-11
Time: 13:18

Re: HTML formatting

Hi,

As far as I remember, you can use something like [companySlct.FINMMR;block=_+option;]. That _ selects the line break at the beginning of the option tag so that each iteration of the block includes the line break, resulting in every option sitting in its own line.

I haven't been using that for a while, if this is wrong information someone please correct me.
By: ege
Date: 2008-03-11
Time: 13:20

Re: HTML formatting

As a side note, I guess only one block=option is enough, the second one (text of the option) would better look like [companySlct.FINAAL].

Regards.
By: Philippe
Date: 2008-03-11
Time: 13:29

Re: HTML formatting

Hi,

that works fine, thanks for that and the side note.

Regards.
By: Philippe
Date: 2008-03-12
Time: 16:27

Re: HTML formatting

Hmmmm, correction it worked fine until I had another select in my page, if I leave the code as it is now

<option value="[companySlct.FINMMR;block=_+option;]">[companySlct.FINAAL;]</option>

Everything between the first select and the second one is repeated !

Adding block=end; to the second field in the first option does not work.

The second option is one I entered manually, one that is not created by tbs.
By: Sheepy
Date: 2008-04-02
Time: 07:49

Re: HTML formatting

In block and magnet, _ means a single line.

Thus, "_" means this line, "_+_" means this and next line, and "_+option" means this line and the <option> following this line.

So use "block=_" instead and it should be fine.
By: Philippe
Date: 2008-04-02
Time: 10:15

Re: HTML formatting

This gives the following error :

"TinyButStrong Error in block's definition [companySlct.FINMMR...] : at least one tag corresponding to _option is not found. Check opening tags, closing tags and embedding levels."