How to concatenate two object attributes and assign the result to a variable

All right, this is really no rocket science it’s just something I needed and took me some time to figure out.

  1. {assign var="fullName" value="`$human->first` `$human->last`"}

or more robust version:

  1. {capture assign="fullName"}
  2. {$human->first} {$human->last}
  3. {/capture}

Leave a Reply