2

How do i include a css and javascript from system/assets/css or js directory in my theme.

we include js or css file like

{pyro:theme:css file="style.css"}
{pyro:theme:js file="jquery.1.5.js"}

but i want to use a js file included in system/assets/js directory

Mujah Maskey
  • 8,654
  • 8
  • 40
  • 61

1 Answers1

3

pyro:theme just access theme assets and partials.

Use asset pyro tags:

{pyro:asset:js file="front.js"}
{pyro:asset:js file="front.js" module="domains"}

Generates:

<script type="text/javascript" src="/system/pyrocms/assets/js/front.js"></script>
<script type="text/javascript" src="http://localhost/addons/modules/domains/js/front.js"></script>

+info: http://pyrocms.com.roy.getcloudigniter.com/docs/tag-reference/asset

Igor Parra
  • 10,214
  • 10
  • 69
  • 101