Why not include the jquery script reference into your html head section?
If you only want to include jquery in 1 specific masterpage then just make a Content Place Holder and in the nested masterpage make a content area. Like below:
The key thing is to set runat="server" on the head tag, i.e. <head runat="server"> as this is how the code finds the head tag no matter where you are in your template.
Actually scratch that. I does not work as inline xslt as the umbraco items are processed first before being the page is processed itself and thus as far as it is concerned there is no <head> tag available at this point.
adding jquery via inline xslt
ive looked at http://our.umbraco.org/wiki/reference/umbracolibrary/addjquery for adding jquery, bt i would like to add it inline instead of making a macro. What s the correct syntax.
I have tried <umbraco:Item runat="server" xslt="umbraco.library:AddJquery()"/> but it doesnt work
<%=umbraco.library:AddJquery()%>
or
<%umbraco.library:AddJquery()%>
Ron
Correction
<%=umbraco.library.AddJquery()%>
or
<%umbraco.library.AddJquery()%>
Ron
Hi Ron,
I couldn't get either of these to work and the correction is the same as the not correction..
i assume you just paste this inline? not in an item tag?
Why not include the jquery script reference into your html head section?
If you only want to include jquery in 1 specific masterpage then just make a Content Place Holder and in the nested masterpage make a content area. Like below:
<asp:ContentPlaceHolder Id="CphHeader" runat="server" />
<asp:Content ContentPlaceHolderID="CphHeader" runat="server">
script link to jquery
</asp:Content>
The key thing is to set runat="server" on the head tag, i.e. <head runat="server"> as this is how the code finds the head tag no matter where you are in your template.
Cheers
Steve
Actually scratch that. I does not work as inline xslt as the umbraco items are processed first before being the page is processed itself and thus as far as it is concerned there is no <head> tag available at this point.
Cheers
Steve
is working on a reply...