Copied to clipboard

Flag this post as spam?

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


  • Alessandro Calzavara 32 posts 144 karma points c-trib
    May 16, 2014 @ 11:18
    Alessandro Calzavara
    0

    Adding a templateAlias after the url changes the rendered template

    I was wondering why www.mywebsite.com/sitemap was rendering the sitemap without any node called sitemap being yet created in content. After some tries I discovered that simply adding a template alias after the url of the page renders the same page with the other template, withouth any check on the allowed templates.

    Is this a bug or an expected behavior?

    (tried it on umbraco 6 and umbraco 7)

    Thanks

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    May 16, 2014 @ 12:46
    Jeavon Leopold
    1

    Hi Alessandro,

    Welcome to Our!

    This is expected behaviour, it is referred to as "alternative template", you can request any node be rendered against any template by requesting it by template alias. You do the same by appending ?altTemplate=sitemap to your Url. A node Url will of course take priority over a alt template request.

    Jeavon

  • Alessandro Calzavara 32 posts 144 karma points c-trib
    May 16, 2014 @ 12:59
    Alessandro Calzavara
    0

    I was aware of the ?altTemplate but not of just the templateAlias added after the node name

     

    Thank you very much!

    Alessandro

Please Sign in or register to post replies

Write your reply to:

Draft