Hello
Could someone point me in the right direction for how to add code to the HTML head of every page?
Also, where would I add code to the HTML head of the receipt page only? While I'm asking, how about other checkout pages like Basket.aspx or OPC.aspx?
I do see in the Admin where to add code to the HTML head of a specific page (homepage, product page or a category page for example), but it seems to be different for certain pages.
Thanks!
Modify the HTML Head
Re: Modify the HTML Head
If you want script to be on all pages then you can add it to layout files. In Layout/Base.master and Layout/Fixed/Base.master. If you just want it on all checkout pages then you can try adding script to Layout/Fixed/Checkout.master by adding another content control somthing like that
Code: Select all
<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeader" runat="server">
<script language="javascript" src="~/yourscript_here.js" type="text/javascript" ></script>
</asp:Content>
Re: Modify the HTML Head
This has been helpful. Thanks!
Is there a way to add a script to the HTML head of Receipt.aspx only?
Thank you.
Is there a way to add a script to the HTML head of Receipt.aspx only?
Thank you.
Re: Modify the HTML Head
Well for that edit Layout/Fixed/Account.master and add following to it
then edit Reciept.aspx and add following to it
Now you should be able to add script this way to any page that uses Account.master layout.
Code: Select all
<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeader" runat="server">
<asp:ContentPlaceHolder ID="HtmlHeadScripts" runat="server">
</asp:ContentPlaceHolder>
</asp:Content>
Code: Select all
<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeadScripts" runat="server">
<script language="javascript" src="~/yourscript_here.js" type="text/javascript" ></script>
</asp:Content>