Custom Page in Magento2

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

Similar questions

Custom redirect user to specific page after register Observer in Magento 2 will just redirect after the cms page to the login page
I have another problem with my custom observer module for account registration page redirect. somehow it will successfully redirect to my custom cms thank you page after registration. but after that one, it will ask me to log in after registration. normally it should be automatically logged in instead of asking me to log in again. Here's the codes:...
Accessing custom product attributes on custom form page (not product / category view page)
Is there any way of accessing the current / most recently viewed product on a custom contact form-type page? For example, a user is on a product view page, then clicks a link which takes them to a page with a form. I'd like to pre-populate one field of the form with an attribute from the current product (the product page that led to this custom for...
Custom Page in Customer My Account Page - Custom Module
I Created a custom module. My requirement is to add new link after all links in Customer My Account. When click on that new link a new page should be shown. My Code is Step 1. Created new file in app/etc/modules named Badge_page.xml Step 2. Created new file in app/code/local/Badge/Page/etc named config.xml Step 3. Created Controller File app/code/l...
How to implement a redirect to a custom success page after submitting a form on a custom page (similar functionality like checkout)
I have a submission form and a controller, with the execute method. At the moment, after sending the form, my page reloads and on top of the page I get an alert that notifies the user about the success or failure of the operation, how can I instead redirect to a custom success page? The execute method of my controller app/code/Vendor/Module/Control...
Add custom checkbox next to custom product attribute input page in product edit page In Magento 2 backend
I created a custom attribute for product called keybrand, i allow this product attribute can be editable from magento 2 backend. Now i want to add the check box input next to this custom attribute input like this: the checkbox should be next to the input and has some label, and the checkbox value can be accessed from the product save after observer...
Magento 2: How to insert a custom JS file in the header of custom theme. This custom JS file is placed in pub/media/pmm-custom directory?
I'm looking for a way to add a custom js file in the header.phtml file. I don't place custom JS file under theme_directory for a obvious reason. Could anyone please tell me how to override header files to inset the custom JS file from pub/media/pmm-custom? To someone who may wonder why the custom JS has to be in pub/media/pmm-custom directory, it i...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.