I am new to Magento 2. We are currently in the process of migrating from Magento 1 and I have been tasked with updating our custom pages to work in Magento 2. I have a page (using the page editor in the admin) that uses it's own styles, jquery and javascript. I have added the files to our template folders and am pulling them in using the xml:

<css src="css/active.min.css" />
<css src="css/apps.min.css" />
<script src="js/active.min.js" />
<script src="js/apps.min.js" />

The files are showing properly in google inspector and are pulling the code when I check them, the css works however none of the js does.

Our developers suggested building a custom module but no matter how much documentation I read I am just not understanding how the Magento 2 modules work. Is there a way to get this to work with template files? I did this the same way with a category and static block and it worked just fine.

Thanks, Niki


You can make a page_layout in wich the scrip is implemented. You do this in your Theme. contact me for further help

  • Thank you I will try this. in the <script> above the linked file is actually .js not .css that was a typo. I may reach out for further assistance. – Niki Felix Feb 27 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.