Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
10060 Visualizzazioni

Here is the dummy code what i am trying to do to achieve something, please check what i want for <p> attribute value during runtime. I dont want the value should be render from python variable.

<t t-foreach="[1,2]" t-as="row_value">

    <div class="row">

        <t t-foreach="[1, 2, 3]" t-as="column_value">

            <p t-attf-id="paragraph_id_{{ row_value * column_value }}"/></p>

        </t>

    </div>

</t>
Here is what i want to render the id value of <p> tag atttibute.
<p id=paragraph_id_1></p>

<p id=paragraph_id_2></p>  

 <p id=paragraph_id_3></p>

<p id=paragraph_id_4></p>

<p id=paragraph_id_5></p>

<p id=paragraph_id_6></p>  

Avatar
Abbandona
Risposta migliore

Try this,


<p t-att-id="'paragraph_id_' +  row_value * column_value "/></p>


Kind regards,

Reda


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 21
4926
1
mar 24
4930
1
giu 18
5954
1
ago 15
10405
1
mag 23
10011