Categories > TinyButStrong general >

missing the point? A newbie question

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: adam
Date: 2008-11-23
Time: 19:38

missing the point? A newbie question

Hello, forgive me if the answers are obvious.

I'm using PHPmotion which is built on TBS.

1) In many cases blocks (? is that right ?)

<!--[var.load_carousel;htmlconv=no;comm]-->

are commented out, as in the above code...

I see the use of "when" so that TBS displays/uses the block based on conditions, so why comment out the TBS code in the HTML? Does that have to do with the way TBS works or is that PHPmotion hiding the code until it determines it should be shown?

Thanks for your time,

Adam
By: Rudy
Date: 2008-11-23
Time: 21:54

Re: missing the point? A newbie question

Hi adam,

what you posted above is a var-field referencing a global variable named "load_carouse1" that automatically gets merged with data when tbs shows the loaded template. The content of the variable will not be converted into html (htmlconv=no), thus it can contain html-code. The parameter "comm" is usually added to make templates better visually editable (like in Dreamweaver). When the variable is merged with data, the comment-parts <!-- and --> are deleted and the content within remains visible.

bye
By: adam
Date: 2008-11-23
Time: 22:42

Re: missing the point? A newbie question

Thanks Rudy- so if I understand it correctly, commenting out the code doesn't mean anything to tbs, but rather is done to make the mark-up easier to deal with?
By: Rudy
Date: 2008-11-23
Time: 22:47

Re: missing the point? A newbie question

Commenting out doesn't matter if you use the "comm"-Parameter, because this tells TBS to delete the surrounding comment-parts. If you don't use this parameter, code remains commented out. Most of the time (at least me) you won't use the comm-parameter, but in special cases or if generally you want to use visual editors to edit your templates and don't want to see tbs-code between the html, "comm" is useful.
By: adam
Date: 2008-11-23
Time: 23:23

Re: missing the point? A newbie question

Thanks! That makes perfect sense now...