Copied to clipboard

Flag this post as spam?

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


  • Mattia 1 post 21 karma points
    Sep 29, 2013 @ 01:49
    Mattia
    0

    altTemplate / template / macro. Can I retrieve GET data parameter?

    Hello! I am a new Umbraco user =)

    home.aspx?alttemplate=someTemplate&page=3

    Can I get che content of "page" parameter inside an altTemplate? Should I use a macro for that? Also... Can an altTemplate knows about current user that is requesting the page? in other words, can I access to session cookie token to see if the user is an authenticated user, and then get his personal information?

     

    I am writing a mobile application. My basic purpose is:

    • List a series of item, and also using pagination
    • Get personal data from user that is requesting the template
    Thanks
    p.s. Is there a guide of Umbraco altTemplate?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 30, 2013 @ 10:23
    Ismail Mayat
    0

    Mattia,

    Alt template as well as doing it with query string you can also do home/someTemplate.aspx?page=3 the http handler in umbraco will map everything for you. Also the alt template is just another template so accessing things using querystring and getting the current user will all still work.

    I think there is something on umbraco tv regarding alt templates also definately chapter in the umbraco book http://www.amazon.co.uk/dp/0470560827

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft