Copied to clipboard

Flag this post as spam?

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

  • Vishmay 19 posts 100 karma points
    Jan 18, 2017 @ 06:27

    Can i read id from url route in macro?

    In my application i've a page will have a macro

    My general Url is http://localhost/Mylistpage

    Works fine if http://localhost/Mylistpage?id=236

    for <xsl:param name="qryString" select="umbraco.library:RequestServerVariables('QUERY_STRING')" />

    My specific url need to be http://localhost/Mylistpage/236

    Just similar to mvc default route, i need to access this 236 in my macro as id parameter in macro

    is it possible and how to do that?

    Let me know if you need more understanding

  • Alex Skrypnyk 6060 posts 23282 karma points MVP 6x admin c-trib
    Jan 19, 2017 @ 22:26
    Alex Skrypnyk

    Hi Vishmay,

    What is this url? What is this number? Did you create this route?


  • Vishmay 19 posts 100 karma points
    Jan 23, 2017 @ 04:50

    The url is a page created from content section of menu. I need an optional parameter id to be in that url I can work with ?id=2 but i want to recognize it as url component not query string like mvc default route does

    that is http://url/2

    Then i need to access this 2 in my macro. hope this helps

  • Ifrahim Rasool 28 posts 82 karma points
    Jan 23, 2017 @ 12:17
    Ifrahim Rasool

    Looks like you need to create a new Route. Then try Request["parameter"]

Please Sign in or register to post replies

Write your reply to: