# Adding Style Sheet and js files in twig

**URL:** <https://discourse.slimframework.com/t/adding-style-sheet-and-js-files-in-twig/1120>\
**Category:** Questions\
**Created:** [February 2, 2017, 1:22pm UTC](https://discourse.slimframework.com/t/adding-style-sheet-and-js-files-in-twig/1120 "2017-02-02T13:22:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramyhakam](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ramyhakam/32/195_2.png) [@Ramyhakam](https://discourse.slimframework.com/u/Ramyhakam)\
**Post date:** [February 2, 2017, 1:22pm UTC](https://discourse.slimframework.com/t/adding-style-sheet-and-js-files-in-twig/1120/1 "2017-02-02T13:22:18Z")

</div>

I am a new in using twig view in slim framework  
When i try to link some style sheet or js in twig template this error is acuuer  
how i can add external css and js files in twig template  
///  
**Twig\_Error\_Syntax**  
\*\* Message: Unknown “asset” function.\*\*  
///

---

<div class="post-metadata">

**Author:** ![dominik.zogg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/dominik.zogg/32/235_2.png) [@dominik.zogg](https://discourse.slimframework.com/u/dominik.zogg)\
**Post date:** [February 2, 2017, 1:37pm UTC](https://discourse.slimframework.com/t/adding-style-sheet-and-js-files-in-twig/1120/2 "2017-02-02T13:37:58Z")

</div>

@Ramyhakam those “asset” function aren’t part on twig, they are part of frameworks like symfony fullstack and probably others got a solution for assets. So you ca try to find a existing solution (twig functions) for slim or build them yourself. A few of them based on the following library: [https://github.com/kriswallsmith/assetic](https://github.com/kriswallsmith/assetic)
