# Knockout-Sortable (template) How to set script type="text/html"

**URL:** https://discourse.cakephp.org/t/knockout-sortable-template-how-to-set-script-type-text-html/552
**Category:** Need Help
**Created:** [June 15, 2016, 6:00pm UTC](https://discourse.cakephp.org/t/knockout-sortable-template-how-to-set-script-type-text-html/552 "2016-06-15T18:00:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ado20](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Ado20](https://discourse.cakephp.org/u/Ado20)
#### Post date: [June 15, 2016, 6:00pm UTC](https://discourse.cakephp.org/t/knockout-sortable-template-how-to-set-script-type-text-html/552/1 "2016-06-15T18:00:30Z")

</div>

Hi guys,  
I want to use knockout-sortable plugin in my CakePHP project and reproduce this behaviour :  
[http://jsfiddle.net/rniemeyer/XDtdN/](http://jsfiddle.net/rniemeyer/XDtdN/)

Author of this code using script type=“text/html” for templates, but how to do it in CakePHP ?  
I try to put html code simply into my .ctp file, but it of course doesnt work.

I am newbie here, please help me, how to figure it out ?

---

<div class="post-metadata">

### Author: ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)
#### Post date: [June 16, 2016, 2:50am UTC](https://discourse.cakephp.org/t/knockout-sortable-template-how-to-set-script-type-text-html/552/2 "2016-06-16T02:50:50Z")

</div>

I did not try this, but I think you can set attributes in the second parameter (see [Creating Inline Javascript Blocks](http://book.cakephp.org/3.0/en/views/helpers/html.html#creating-inline-javascript-blocks)

Something like this

```auto
$this->Html->scriptStart(['block' => true, 'type' => 'text/html']);
echo "alert('I am a HTML type script');";
$this->Html->scriptEnd();

```
