0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

particle block 'javascript_footer' is not working

    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 11

    particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • On Gantry 5 Documentation page docs.gantry.org/gantry5/tutorials/particle-blocks , it says "If you want a JavaScript asset to load just prior to the </body> tag of the page, you would exchange block javascript with block javascript_footer." But it seems not working.

      Here's how I build a new 'Js' particle to hold the javascript files I wish to be loaded before the closing body tag:

      YAML file(js.yaml):

      name: Js
      description: Loading JS before closing body tag
      type: particle
      
      form:
        fields:
          enabled:
            type: input.checkbox
            label: Enabled
            description: Globally enable to the particles.
            default: true
          file:
            type: input.filepicker
            label: JS File
            description: JS file to be loaded.



      twig file(js.html.twig):


      {% extends '@nucleus/partials/particle.html.twig' %}
      
      {% block javascript_footer %}
          <script src="{{ particle.file }}"></script>
      {% endblock %}

      This new created Js particle does appear in my particle list, I place it to copyright section, however, although the js file is successfully loaded, it is not before the closing body tag, rather it is before the closing div#g-page-surround tag, and outside of copyright section.
      This image is hidden for guests.
      Please log in or register to see it.

      This image is hidden for guests.
      Please log in or register to see it.

      This image is hidden for guests.
      Please log in or register to see it.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • why don't you just use the existing custom css/js atom that already exists? why do you need to create a new particle? (which should actually be an atom anyway)?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 11

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • 1) For learning purpose
      2) I need the javascript files to be loaded right before the closing body tag. Using atom, they are not.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • Please would you post your URL, superuser id and pswd in the secure tab of your post and i'll have a look for you.

      Also, Please post your FTP logon, password and FTP URL in the secure area of your post.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 11

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • It is raw Ambrosia template rocket launcher. I didn't do anything to it except that mentioned in the main thread.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • MrT wrote:
      Please would you post your URL, superuser id and pswd in the secure tab of your post and i'll have a look for you.

      Also, Please post your FTP logon, password and FTP URL in the secure area of your post.


      FTP details?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 11

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • Sorry forgot.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • On FTP, I just get "critical error could not connect to server" - usually this is because there is some geoblocking or IP whitelisting?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 11

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • This message contains only secure information that is visible to MrT, moderators and administrators
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: particle block 'javascript_footer' is not working

    Posted 9 years 11 months ago
    • This message contains only secure information that is visible to shenk, moderators and administrators
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.108 seconds