Developer forum

Forum » Rapido » Use custom.js with NoEcommerce template

Use custom.js with NoEcommerce template

Axel Marijt
Axel Marijt
Reply

Hi,

We've tried adding the Google Analytics code through the custom.js file like explained in this thread: https://doc.dynamicweb.com/forum/rapido-and-wrap/rapido-and-wrap/google-tracking-id-and-rapido 

We don't use de eCommerce, so we use the PageNoEcom.cshtml template instead of the page.cshtml template. But we noticed that the custom.js file is only added when we use select the page.csthml template.

How can we solve this and use the custom.js file when the PageNoEcom.cshtml template is selected?

 


Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply
This post has been marked as an answer

Hi Axel

Yes, that is a bug. Thank you for the find. To solve it, go to the MasterNoEcom.cshtml and scroll to the bottom. In the area that states Javascript, paste this code:

@if (Model.Area.Item.GetBoolean("UseCustomJavascript"))
{
     <script src="/Files/Templates/Designs/Rapido/js/custom.min.js"></script>
}

 

Best regards
Karsten Thuen

Votes for this answer: 1
 
Axel Marijt
Axel Marijt
Reply

Hi Karsten,

Thanks! It's works.

 

Grt. Axel

 

You must be logged in to post in the forum