1. #1
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france
    Posts
    61
    Vote Rating
    1
    Answers
    7
    Jad is on a distinguished road

      0  

    Default Unanswered: Xtemplate

    Unanswered: Xtemplate


    Hello

    I have an Xtemplate like this :

    HTML Code:
    <tpl for="invoice.items">
    <tr><td>{name} du {description.startDate} au {description.endDate}</td>
    <td><tpl if="description.prices">
    <ul><tpl for="description.prices">
    <li>Tarification {tariffingYear} {price} {parent.description.currency}</li>               
    </tpl></ul>            
    </tpl>           
    
    <tpl if="description.fees">
    <strong>Frais</strong>
    <ul><tpl for="description.fees">
    <li>{name}
    <ul><tpl for="prices">
    <li>Tarification {tariffingYear} {price} {parent.parent.description.currency}</li>                        </tpl></ul>
    </li>
    </tpl></ul>
    </tpl>
    
    <tpl if="description.seasons">
    <strong>Saisons</strong>
    <ul><tpl for="description.seasons">
    <li>du {startDate} au {endDate}
    <ul>
    <li>Tarification {tariffingYear} {price.price} {[parent.parent.description.currency]</li></ul>
    </li>
    </tpl></ul>
    </tpl>
    </td>
    <td align="right">{amount}</td>
    </tr>
    </tpl>
    parent.parent.description.currency not work.

    How to do that ?

    Thanks a lot :-)

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Vote Rating
    96
    Answers
    113
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    there seems to be a syntax error here:
    Code:
    <li>Tarification {tariffingYear} {price.price} {[parent.parent.description.currency]</li></ul> </li>

  3. #3
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france
    Posts
    61
    Vote Rating
    1
    Answers
    7
    Jad is on a distinguished road

      0  

    Default


    I'm sorry it doe's not work better

  4. #4
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france
    Posts
    61
    Vote Rating
    1
    Answers
    7
    Jad is on a distinguished road

      0  

    Default


    I'm in the description.fees.prices node and i want to accede to description.currency

  5. #5
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france
    Posts
    61
    Vote Rating
    1
    Answers
    7
    Jad is on a distinguished road

      0  

    Default


    What about this solution

    <tpl if="description.fees">
    <strong>Frais</strong>
    <ul><tpl for="description.fees">
    <li>{name}
    <ul><tpl for="prices">
    <li>Tarification {tariffingYear} {price} {[r2.description.currency]}</li>
    </tpl></ul>
    </li>
    </tpl></ul>
    </tpl>

Thread Participants: 1