move the inclusion of the .js file to just above the - JoomlArt
30% OFF for JA Developer. Coupon: JADEV30 Buy Now
League Bundle $1335 $599 Read More
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • bobptz Friend
    #1018678

    Hi

    I’d like to move the inclusion of the .js file from the section to just above the .

    Which file do I need to change to achieve this?

    Here is a sample line from the source of the html page:
    <script src="/t3-assets/js/js-ba76a-80647.js" type="text/javascript"></script>

    Saguaros Moderator
    #1019043

    Hi,

    This is compressed JS file when you enable the Optimize JS option under template manager section. Could you clarify which js file and which order you prefer?

    bobptz Friend
    #1019077

    I am sorry, the initial post seems to be corrupted.

    What I mean is that the inclusion of all .js files is just above the < / head >

    I want to place them just above the < / body >

    What purity III source file do I need to change to do this?

    Saguaros Moderator
    #1019437

    Hi,

    You can access Administrator Panel > Extensions > Templates > Purity III > Custom code and add your script in the place you wish.

    Regards

    bobptz Friend
    #1019441

    ++++++++++++++++

    You can access Administrator Panel > Extensions > Templates > Purity III > Custom code and add your script in the place you wish.

    +++++++++++++++++

    I face two problems with this: 1) I need to remove the inclusion from the HEAD section first. 2) The filename of the .js file keeps changing.

    Saguaros Moderator
    #1020130

    Sorry, I don’t get your point, which part you want to remove and which .js files’ name are changing?

    bobptz Friend
    #1020208

    Hello

    This is what I want to do: MOVE the .js inclusion from the HEAD section to the end of the BODY section: (see attachment, there was no way to copy the code here)

    I assume that the BEFORE code is constructed from the /templates/purity_iii/tpls/blocks/head.php. I believe by the content of this function : addHead();

    So I need to move some piece of code from there and maybe put it somewhere here: /templates/purity_iii/tpls/blocks/mainbody.php

    I am sure the loadBlock(..) function is involved…. and this is as far as I could go.

    As for the changing filenames. Here is the filename of an included .js file:
    src="/t3-assets/js/js-ba76a-20058.js

    And after I recompiled the LESS files, this is the new filename:
    src="/t3-assets/js/js-ba76a-80647.js

    Is this clear now?


    1. jart
    Saguaros Moderator
    #1020878

    You can try open the layout file you’re using: ROOT/templates/purity_iii/tpls/

    Look for this line of code:

    <jdoc:include type="head" />

    and move it to above closing body tag: http://prntscr.com/en17bq

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

This topic contains 7 replies, has 2 voices, and was last updated by  Saguaros 3 months ago.

You must be logged in to reply to this topic.