This question has been flagged
1 Reply
3569 Views

Can someone explain how what #{cls}" means in the qweb tempalting as in this example (extract from the official qweb site):

                      -----------------

div t-name="example_template" t-attf-class="base #{cls}"

                     -----------------

what does cls means (class?) but how the evalution is done agains a context like this:

                  ------------

{ "class1": "foo", "title": "Random Title", ...

                  ------------

Thanks,

Avatar
Discard
Author Best Answer

Aftre some tests, I think that lline in the example from the qweb site is mistaken. In fact this line:

                -----------------

div t-name="example_template" t-attf-class="base #{cls}"

                 -----------------

Should be:

                -----------------

div t-name="example_template" t-attf-class="base #{class1}"

                 -----------------

hope tis helpes someone having the same question.

Avatar
Discard