Results 1 to 2 of 2

Thread: Sencha templates (tpl) with special conditions, hidden or not hidden

  1. #1
    Sencha User
    Join Date
    Jun 2014
    Posts
    12

    Default Sencha templates (tpl) with special conditions, hidden or not hidden

    I am having problems with tpl in Sencha Touch. From the backend I am receiving hidden (false or true) depending of a customizing.
    Can I control this condition among "if and else" instructions?

    Code:
     '<div class="cart-status-toolbar">' +
                    '<tpl if="messagetype == \'E\'">' +
                    '<div class="message {messagetype}">{messagetext}</div>' +
                    '</tpl>' +
                    '<tpl if="messagetype == \'S\'">' +
                    '<div class="label">{["ORDER"]} </div>' +
                    '<div class="total-value">{totalnetvalue}</div>' +
                    '<div class="indicator {lightstatus}">{lightvalue}</div>' +
                    '<tpl if={ordernetamount} === false">' +
                    '<div class="label">{"NET_AMOUNT"} </div>' +
                    '<div class="total-value">{netamount}</div>' +
                    '<div class="indicator {lightstatus}">{lightvalue}</div>' +
                    '</tpl>' </div>' 
    
    



    And the json configuration:

    Code:
    "priceanalysis": [
                {
                    "propertyname": "name",
                    "propertyvalue": "orderpriceanalysis",
                    "hidden": "false"
                },
                {
                    "propertyname": "name",
                    "propertyvalue": "ordernetamount",
                    "hidden": "false"
                },
    ]
    
    




  2. #2
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    599
    Answers
    35

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •