Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 939 posts 2574 karma points
    Sep 09, 2009 @ 15:53
    Claushingebjerg
    0

    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

  • Ron Brouwer 273 posts 768 karma points
    Sep 09, 2009 @ 16:30
    Ron Brouwer
    0

    <%=umbraco.library:AddJquery()%>
    or
    <%umbraco.library:AddJquery()%>

    Ron

  • Ron Brouwer 273 posts 768 karma points
    Sep 09, 2009 @ 16:34
    Ron Brouwer
    1

    Correction

    <%=umbraco.library.AddJquery()%>
    or
    <%umbraco.library.AddJquery()%>

    Ron

  • Tom 713 posts 954 karma points
    Jan 06, 2010 @ 04:20
    Tom
    0

    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?

  • Anders Burla 2560 posts 8256 karma points
    Jan 06, 2010 @ 08:33
    Anders Burla
    0

    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>

  • Steven Wilber 103 posts 98 karma points
    Feb 25, 2010 @ 07:41
    Steven Wilber
    0

    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

  • Steven Wilber 103 posts 98 karma points
    Feb 25, 2010 @ 07:48
    Steven Wilber
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft