Copied to clipboard

Flag this post as spam?

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


  • andy_rose 91 posts 117 karma points
    Sep 28, 2011 @ 15:13
    andy_rose
    1

    Alternative template and the umbracoUrlAlias

    I suspect I have already found my answer but was wondering if I could just get some confirmation. When I access a page using it's url alias as defined in the umbracoUrlAlias property I don't appear to be able to switch to an alternative template by appending the template alias onto the url. I can still switch templates using the AltTemplate querystring property.For example:

    1. http://mysite/standard/url/path/mypage/alternativeTemplate - this works

    2. http://mysite/alias/url/path/mypage/alternativeTemplate - this returns a 404

    3. http://mysite/alias/url/path/mypage?altTemplate=altenativeTemplate - this works

    Can anyone confirm if this is definitely the case and that there are no work arounds?

     

  • andy_rose 91 posts 117 karma points
    Sep 28, 2011 @ 15:38
    andy_rose
    1

    We've managed to kind of get round it by using a url rewrite. An example below for the UrlRewriting.config file for anyone who is interested:

        <add name="rssrewrite"
                  virtualUrl="^(.*)/rss.xml"
                  rewriteUrlParameter="ExcludeFromClientQueryString"
                  destinationUrl="~$1?altTemplate=rss"
            ignoreCase="true" />
Please Sign in or register to post replies

Write your reply to:

Draft