Copied to clipboard

Flag this post as spam?

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


  • David F. Hill 122 posts 242 karma points
    Mar 31, 2010 @ 18:05
    David F. Hill
    0

    Template alias as URL

    Hello Umbraco Colleagues,

    What configuration is necessary so that the template alias assigned to a node becomes that node's url?

    David Hill

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 31, 2010 @ 18:07
    Douglas Robar
    0

    Too easy!

    Assuming you have a page at url: www.example.com/mypage.aspx

    Assuming you have a template with an alias of 'rss'...

    Either of these will work: www.example.com/mypage.aspx?altTemplate=rss or www.example.com/mypage/rss.aspx

    No configuration necessary.

    cheers,
    doug.

  • David F. Hill 122 posts 242 karma points
    Mar 31, 2010 @ 18:18
    David F. Hill
    0

    Thank you, doug -

    However... (using your example), I am also able to access the page at this url: www.example.com/rss.aspx

    I don't know why that would be.

    David

     

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 31, 2010 @ 18:30
    Douglas Robar
    0

    Well, depending on what your rss template does you might get the same output no matter the url? In your example, you're basically appying the rss template to the homepage (the "/" url).

    Make sense?

    cheers,
    doug.

  • David F. Hill 122 posts 242 karma points
    Mar 31, 2010 @ 18:36
    David F. Hill
    0

    Ah - OK.

    Thank you, doug.

    David Hill

  • Angad Bhat 22 posts 42 karma points
    Jun 14, 2010 @ 11:10
    Angad Bhat
    0

    Can anybody tell me how i can stop template alias as url?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jun 14, 2010 @ 11:37
    Dirk De Grave
    0

    you can't and that's by design...

  • Angad Bhat 22 posts 42 karma points
    Jun 14, 2010 @ 11:56
    Angad Bhat
    0

    Thanks Dirk.

    I have a template called Sitemap which is generated using in-built xslt code. The node name is called Site-map. When i click the "site map" link in my website it shows the site map information one of my clients typed http://www.mydomain.ac.uk/sitemap (which is the alias of the sitemap template), the home page got replaced by the sitemap information. Any ideas how I can change so that when sitemap is typed it shows 404 error instead of site-map tempalte information.

     

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft