<p>Found out how to do this. If anyone else needs something similar then adding the new <code>{{ jsClass }}</code> part of input template into a function and calling it after extra elements are added also makes them sortable.</p>

CC BY-SA 3.0
2015-02-09T07:55:16.620Z
2015-02-09T08:06:53.463Z
2015-02-09T08:06:53.463Z
Gints Ligotnis
<p>Is it possible to add an element to the existing assets list and make it sortable </p>

<p>i need it because i have made some modifications that allow to group 2 assets together so generally i now have a list of normal assets added to entries and grouped ones that are wrapped in a div with class pair</p>

<p>i can sort the assets within pairs and assets outside any of the pairs but not the pairs themselves.</p>

<p><img src="https://i.sstatic.net/MP2kA.png" alt="an example"></p>

<p>In the screenshot you can see that there are two pairs with the purple background. Would it be possible to somehow add them to the sorting flow so i could drag them around as well?</p>

CC BY-SA 3.0
2015-02-06T11:41:44.313Z
Never mind the question, found out how to do this. If anyone else needs something similar then adding the new {{ jsClass }}( part of input template into a function and calling it after extra elements are added also makes them sortable
Gints Ligotnis
CC BY-SA 3.0
2015-02-06T16:40:56.403Z
Would you mind entering that as an official answer, @Gints?
Brad Bell
<entries><assets><control-panel><sorting>
cp panel entry assets element sorting
# cp panel entry assets element sorting

(Asked by: username_0 on 2015-02-06)

Is it possible to add an element to the existing assets list and make it sortable

i need it because i have made some modifications that allow to group 2 assets together so generally i now have a list of normal assets added to entries and grouped ones that are wrapped in a div with class pair

i can sort the assets within pairs and assets outside any of the pairs but not the pairs themselves.

![an example](https://i.sstatic.net/MP2kA.png)

In the screenshot you can see that there are two pairs with the purple background. Would it be possible to somehow add them to the sorting flow so i could drag them around as well?

**Tags:** entries, assets, control-panel, sorting

> **Comments:**
> **username_0**: Never mind the question, found out how to do this. If anyone else needs something similar then adding the new {{ jsClass }}( part of input template into a function and calling it after extra elements are added also makes them sortable  
> **username_1**: Would you mind entering that as an official answer, @Gints?  

---

## 1 answers

### Answer by username_0 on 2015-02-09. Score: 0 | Accepted answer

Found out how to do this. If anyone else needs something similar then adding the new `{{ jsClass }}` part of input template into a function and calling it after extra elements are added also makes them sortable.


---

