typoscript condition with constants

small snippet great effect to your typoscript. i use this to spare lines of executed typoscript if the editor won’t use it anyways. in my opinion it’s not only a great tool for extension development, but also it can restructure parts of your ts setup of the site.

constants:

SHOWBADGE = 1

setup:


# only work out stuff for SHOWBADGE is true

[globalVar = LIT:1 = {$SHOWBADGE}]

page.10.marks.A < lib.showBadge
# etc...
[global]

i don’t know what the LIT:1 means, but it works. i mean, is there a LIT:2 and so on? if you’ve got crucial information on this matter, comment or mail me. thanks.

additional philosophy: what are constant conditions anyway?

similar posts @ bloxtacy:

One thought on “typoscript condition with constants

  1. Hi,

    the LIT is the value you expecting, i needed this to check whether the houseID is 22 so:

    [globalVar = LIT:22 = {$houseID}]

    bye

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>