Copied to clipboard

Flag this post as spam?

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


  • Profiterole 232 posts 264 karma points
    Jan 19, 2011 @ 04:21
    Profiterole
    0

    Another inline xslt trouble!

    Hi guys, after completed a form, users a redirected (by contour) on a confirmation page, than redirected on another page choosen by the admin.

    So, Contour works great a redirect to my "thank you" page.

    In my "thank you" page template I have this :

    <meta http-equiv="refresh" content="<umbraco:Item field="redirectTime" textIfEmpty="5" runat="server" />; url=<umbraco:Item field="urlRedirect" runat="server" xslt="umbraco.library:GetXmlNodeById({0})/data [@alias='urlRedirect']" />" /> 

    The redirectTime (a string) works fine but the "urlRedirect" doesn't work. Without the xslt it tries to redirect to node number (1777), so it gives me a 404 error. "urlRedirect" is a Content picker.

    With the xslt part, in html it gives me

    <meta http-equiv="refresh" content="5; url=" /> 

    So what I missed?

    Thank you!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jan 19, 2011 @ 04:43
    Tom Fulton
    1

    Hi

    Just to confirm, are you using an Umbraco version prior to 4.5?  Or using 4.5 with the legacy schema enabled?

    I noticed your XSLT is using the old schema.  If you are using 4.5+ it should be:  umbraco.library:GetXmlNodeById({0})/urlRedirect

    I haven't tested to see if this will even work but thought I'd get the obvious out of the way first :)

    -Tom

  • Deng 7 posts 30 karma points
    Jan 19, 2011 @ 12:00
    Deng
    1

    I do not quite understand your... purpose, are you try to do something like:

    <meta http-equiv="refresh" content='<umbraco:Item field="redirectTime" textIfEmpty="5" runat="server" />; url=<umbraco:Item field="urlRedirect" runat="server" xslt="umbraco.library:NiceUrl({0})" />' /> 

    or just (if not considering SEO or URL look and feel)

    <meta http-equiv="refresh" content='<umbraco:Item field="redirectTime" textIfEmpty="5" runat="server" />; url=<umbraco:Item field="urlRedirect" runat="server" xslt="concat('/', {0}, '.aspx')" />' /> 
  • Profiterole 232 posts 264 karma points
    Jan 19, 2011 @ 16:21
    Profiterole
    0

    Ok it worked! It was a ' or " trouble!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies