0

Aliases for query type keys?

Is it possible to change the name that a "query" type parameter is passed through with? It would be great to have an "alias" attribute or similar on the <key> element.

-md

by
2 Replies
  • QUOTE (Mike Dillon @ May 9 2009, 11:06 AM) <{POST_SNAPBACK}>
    Is it possible to change the name that a "query" type parameter is passed through with? It would be great to have an "alias" attribute or similar on the <key> element.

    -md


    This is very valid request and we already have this on our list of todo tasks :-)
    Until we get to it, you can use the URI Template workaround to customize the name

    Let's assume you would like to alias query parameter called 'c' with 'color'. The template would prepend/prefix the value of color w/ 'c='

    CODE
    <url>http://example.com?{-prefix|c=|color}</url>
    ..
    <key id="color" .... paramType='query'/>


    -- Nagesh
    0
  • QUOTE (Nagesh Susarla @ May 9 2009, 11:42 AM) <{POST_SNAPBACK}>
    CODE
    <url>http://example.com?{-prefix|c=|color}</url>
    ..
    <key id="color" .... paramType='query'/>


    -- Nagesh


    Shouldn't this be paramType="path"? Otherwise I'd expect to see both "c" and "color" in the URL.

    -md
    0

Recent Posts

in YQL