Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • abongwa Friend
    #1018609

    We installed a component with plugin and modules but the js files of this component are not added in the head section

    I tried :
    $doc = JFactory::getDocument();
    $doc->addStyleSheet(+++++++++++);
    $doc->addScript(+++++++++++);

    but it not works

    can you help me?

    Pankaj Sharma Moderator
    #1018778

    Hi
    Have consulted the extension developer how they defined their file in the extension?
    In template if you want to load external script you have options in the template options > Custom code Tab.

    Regards

    abongwa Friend
    #1018981

    Hi Pankaj, Thanks for your reply.
    I’m the developer of the extension and I have the possibility to customize my component to loads the js and css files with the php/Joomla code that you tell me.
    I can’t use the options > Custom code Tab because every page of my component load different css/js files, in other way I have to load all files for all the webside pages.
    Please, feel free to reply for any questions
    I’m waiting from your reply soon.

    Pankaj Sharma Moderator
    #1018988

    Hi
    I am not sure about your extension how it developed. In template you have option to add custom code via custom tab or you can open Template folder /etc/assets.xml file and define your js file.
    Regards

    abongwa Friend
    #1019057

    Thanks again Pankaj,
    So You are telling me that for every new components, modules etc that I will install in the website, that use your template, I have to check all css and js file that the item(components, modules) try to include in the website and add them in the the custom tab -> custom code ?
    Regards

    Pankaj Sharma Moderator
    #1019082

    Hi
    Each component, extension comes with their own style and js file.
    You was asking for how to add additional js file in this template. So these are two ways.
    I never saw any popular component does not comes with template.
    As you said yoy are also a developer i think you should add it in your extension rather than define it in template.

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

This topic contains 5 replies, has 2 voices, and was last updated by  Pankaj Sharma 7 years, 7 months ago.

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