---
title: "Syntax differences: Sline vs Handlebars"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/syntax-differences-sline-vs-handlebars'
  md: 'https://developer.shopline.com/docs/sline/syntax-differences-sline-vs-handlebars.md'
---
# Syntax differences: Sline vs Handlebars
<table>

    <tr>
      <th>Functionality</th>
      <th>Category</th>
      <th>Handlebars</th>
      <th>Sline</th>
    </tr>
 
    <tr>
      <td rowspan="3"><strong>String</strong></td>
    </tr>
    <tr>
      <td>Double quotes</td>
      <td>Multiple characters: <code>"str"</code></td>
      <td>Multiple characters: <code>"str"</code></td>
    </tr>
    <tr>
      <td>Backticks</td>
      <td>Not supported</td>
      <td>Multiple characters: `` `str` ``</td>
    </tr>
    
    <tr>
      <td rowspan="3"><strong>Scope</strong></td>
      <td>` this`</td>
      <td>`{{ this.title }}`</td>
      <td>`{{ title }}`</td>
    </tr>
    
    <tr>
      <td>`./`</td>
      <td>`{{ ./title }}`</td>
      <td>`{{ title }}`</td>
    </tr>
    <tr>
      <td>`../`</td>
      <td>`{{ ../title }}`</td>
      <td>Unable to access variables in the parent scope</td>
    </tr>
    
    <tr>
      <td rowspan="2"><strong>Expression</strong></td>
      <td>Array indexes</td>
      <td>`{{ products.[0].title }}`</td>
      <td>`{{ products[0].title }}`</td>
    </tr>
    <tr>
      <td>Variable access</td>
      <td>`{{ get key (get index products) }}`</td>
      <td>`{{ products[index][key] }}`</td>
    </tr>
    
    <tr>
      <td><strong>Comments</strong></td>
      <td></td>
      <td>
        + `{{!-- This is a comment --}}`<br/>
        + `{{#comment}} Comments {{/comment}}`
      </td>
      <td>`{{!-- This is a comment --}}`</td>
    </tr>
    
    <tr>
      <td rowspan="3"><strong>Extended capability</strong></td>
      <td>Helper</td>
      <td>
        + Single line: `{{ capitalize "test" }}`<br/>
        + Block: `{{#if true}} OK {{/if}}`
      </td>
      <td>Use tags or filters instead</td>
    </tr>
    <tr>
      <td>Tag</td>
      <td>Not supported</td>
      <td>
        + Self-closed: `{{#component "a" /}}`<br/>
        + Block: `{{#if true}} OK {{/if}}`
      </td>
    </tr>
    <tr>
      <td>Filter</td>
      <td>Not supported</td>
      <td>`{{ "a,b,c" | split(",") | join("-") }}`</td>
    </tr>
    
    
    
    
    
    
    
    
    
    
    
    
    
  </table>


