test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Trimud Friend
    #152899

    Hi all,

    I have included my own JS files in templates/ja_t3_blank/blocks/head.php this way:

    <?php JHTML::script ('', 'templates/ja_t3_blank/js/system-message.js') ?>

    I have seen in info.xml file of the default theme in the jat3 plugin, that JS and CSS files are included this way:

    <stylesheets>
    <file>css/usertools.css</file>
    </stylesheets>
    <scripts>
    <file>js/core.js</file>
    </scripts>

    Since I have uploaded my own theme: called “yellow” and this theme files are in templates/ja_t3_blank/core/themes/yellow I tried to add


    <scripts>
    <file>js/system-message.js'</file>
    </scripts>

    in the info.xml file of the theme but nothing happend 🙁

    Where am I doing wrong?

    Thanks in advance,
    Yuriy

    Khanh Le Moderator
    #351118

    You are right when including your js/css file by declaring it in info.xml. Do you select to use your new theme by choosing it in profile tab in template manager? Moreover, your js file should be put into your theme (templates/ja_t3_blank/core/themes/yellow/js/system-message.js). You also should put your theme into local folder (templates/ja_t3_blank/local/themes/yellow), so you could know what is your work and will not be affected when you update the template later.

    socoweb Friend
    #359878

    We have followed all of these instructions, all of the files are in the correct places.

    Why would the info.xml file not be loading the CSS file called in the file? The CSS from the core/themes/theme-name/info.xml is not loading into the site template.

    I should be able to see the file referenced in read in the source, but it’s not being pulled into the site.

    example:

    <?xml version=”1.0″ encoding=”utf-8″?>
    <theme>
    <name>name</name>
    <description>Visual Interface for frontend</description>
    <date>October 2010</date>
    <version>1.0.0</version>
    <author>author</author>
    <copyright>author</copyright>
    <stylesheets>
    <file>/templates/template-name/exmenu/css/menu.css</file>
    </stylesheets>
    </theme>

    Trimud Friend
    #359927

    Hi,

    when You view the source of the page do You see the CSS file loaded in the <head>
    If so what is the path to this file?

    socoweb Friend
    #360641

    We do not see the source path to the CSS that we want loaded; it’s not loading at lal from the info.xml file.

    When the source is viewed, we see:

    <link rel=”stylesheet” href=”/templates/template-name/css/template.css” type=”text/css” />
    <link rel=”stylesheet” href=”/templates/template-name/css/menu/mega.css” type=”text/css” />
    <link rel=”stylesheet” href=”/templates/template-name/core/themes/more_contrast/css/template.css” type=”text/css” />
    <link rel=”stylesheet” href=”/templates/template-name/core/themes/more_contrast/css/menu/mega.css” type=”text/css” />

    but we should also see declared
    <link rel=”stylesheet” href=”/templates/template-name/exmenu/css/menu.css” type=”text/css” />

    but it’s just not loading the declaration into the page

    Khanh Le Moderator
    #360740

    @socoweb: please change the path in the info file to the path relative to the template. in this case, you should change to:

    <stylesheets>
    <file>exmenu/css/menu.css</file>
    </stylesheets>

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  Khanh Le 14 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum