<p>Craft uses the the template engine <a href="https://twig.symfony.com" rel="nofollow noreferrer">twig</a> and there is a <a href="https://twig.symfony.com/doc/2.x/tags/set.html" rel="nofollow noreferrer">set</a> tag that is the same as it's php equivalent for <code>$order = 'pin...'</code></p>

<p>So you just set/declare a variable - in this case you set the string.</p>

CC BY-SA 3.0
2018-01-28T20:29:32.443Z
2018-01-28T20:36:51.787Z
2018-01-28T20:36:51.787Z
Robin Schambach
<p>I am new to using twig and I do not understand how this line of code works. If you could explain that would be wonderful! thanks:)</p>

<order>
what does {% set order = 'pin desc, postDate desc' %} do?
# what does {% set order = 'pin desc, postDate desc' %} do?

(Asked by: username_0 on 2018-01-28)

I am new to using twig and I do not understand how this line of code works. If you could explain that would be wonderful! thanks:)

**Tags:** order


---

## 1 answers

### Answer by username_1 on 2018-01-28. Score: 2

Craft uses the the template engine [twig](https://twig.symfony.com) and there is a [set](https://twig.symfony.com/doc/2.x/tags/set.html) tag that is the same as it's php equivalent for `$order = 'pin...'`

So you just set/declare a variable - in this case you set the string.


---

