Using contents of fields in a template html attribute

(5 posts) (2 voices)


No tags yet.

  1. maron, Member

    I have this code in a template

    <div class="item #id"> <div class="nr">#nr</div> <div class="customer_firstname">#customer_firstname</div> <div class="timi">#timi</div> <div class="name">#name</div> <div class="product_options">#product_options</div> </div>

    I am trying to get an order id into the class of the parent div - however #id parses as
    <span class=" hdr_show"="">2,214">
    When all I want is 2214

    Is there any way to tell the template to skip the additional span for just that one element - something like ##id and I would just get the raw data in the template?


  2. myDBR Team, Key Master

    Do you have myDBR commands applied to the data passed on to the template? How does your template usage look like?

    myDBR Team

  3. maron, Member

    select 'dbr.colstyle','nr', '%d'; select 'dbr.hdr', 1,2,3,4; select '','sp_DBR_change_order_status','[nr]','popup','inOrderId=nr'; select 'dbr.hidecolumn','status'; select 'dbr.keepwithnext'; select 'dbr.template','#MenuItem'; select o.entity_id as id, o.entity_id as nr, o.customer_firstname, DATE_FORMAT(o.created_at, '%H:%i') as timi, o.status,, it.product_options ...

  4. myDBR Team, Key Master

    As the o.entity_id is part of the header it inherits the header formatting (albeit myDBR internal one). The easiest way is to select o.entity_id again as a extra column and apply %d formatting for it. No need to hide it (same goes with status), as you are using a template.

    myDBR Team

  5. maron, Member

    Excellent - thanks. moving o.entity_id last works perfectly - now on to some jquery magic.


You must log in to post.