Jump to content

How to add CSS/Javascript files to a new created application


PasXal

Recommended Posts

Posted

Hey,

is there any way to add css / javascript files to a new created application?
I tried to add
 

<css css_location="front" css_app="name_of_the_app" css_attributes="" css_name="application.css"></css>


in my .phtml file but it does not work.

I also tried
 

{parse addtohead="file.css" type="css"}
{parse addtohead="file.js" type="javascript"}


My css / js files are stored in "application/myApplication/css/front/file.css" and "application/myApplication/js/front/file.js". They are not handled by the application automatically.
What's the best way to do that? Is there a tutorial?

  • 3 weeks later...
Posted

Hi,

{parse addtohead="file.css" type="css"}
{parse addtohead="file.js" type="javascript"}

I would also like an answer to this question. I've found some documentation about this particular case dating back from 2008. Now, seems it's not working anymore..

  • 2 years later...
Posted

An example (includeJS) or (includeCSS) of what you need exists in your global template

{template="includeJS" if="theme.js_include != 'footer'" app="core" group="global" location="global" params=""}

That could be used without the "if" like so

{template="includeJS" app="core" group="global" location="global" params=""}

Same applies to your css

{template="includeCSS" app="core" group="global" location="global" params=""}

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...