URL parameter value in macro

Vasyl Chepil asked on February 16, 2018 17:21

my page has an alias "/articles/{artcategory}"

i know that expression {?artcategory?} allows me to insert "artcategory" into html

but i want to assign "artcategory" parameter value to a variable in Txt/XML transformation macro

something like this

{%
urlparam = artcategory.ToLower();

/*and here i would work with urlparam variable*/
%}

Correct Answer

Brenden Kehren answered on February 16, 2018 17:34

If you're looking to get it from the URL you can use one of the following approaches:

{%artcategory%}
{%QueryString.GetValue("artcategory")%}

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.