Copied to clipboard

Flag this post as spam?

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


  • radmanmm 117 posts 108 karma points
    Sep 21, 2009 @ 03:20
    radmanmm
    0

    Xslt function for requested url domain

    Hello All,

    I have started using the Blog4Umbraco package, very nice by the way.  I have one small issue.  One if its xslt scripts references a SiteUrl string which is manually entered.  I am running my family site such that each family member has their own subdomain and I am using umbracos domain feature.  The problem I have is, I need to have that SiteUrl variable be loaded with which ever domain was in the request for the page so that it works correctly with the rss feeds.  anyone know of a function that tells me "http://sub.domain.com/" part of the request url?

    Thanks.

  • Petr Snobelt 923 posts 1535 karma points
    Sep 21, 2009 @ 08:21
    Petr Snobelt
    0

    Hello, try

    <xsl:variable name="url" 
    select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))" />

    Petr

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 21, 2009 @ 08:27
    Dirk De Grave
    0

    Hi radmanmm,

    Can't you just use umbraco.library:RequestServerVariables("SERVER_NAME")?

     

    Cheers,

    /Dirk

  • radmanmm 117 posts 108 karma points
    Sep 22, 2009 @ 04:20
    radmanmm
    0

    Thanks all,

    Petr's was the first solution I tried and it worked, thanks Dirk for the input though.

Please Sign in or register to post replies

Write your reply to:

Draft