Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...


How to pass parameters in the new MVC style?

We are going to upgrade our website from to 10.x and I am trying to evaluate the impact of it on my XML.CONFIG packages (we have around 400 ones).

One of the things that is bugging me is the new format for links ruled by MVC. I saw this sample in the Vortx upgrade guide:

Replace any links to topics such as this:


<a href="t-faq.aspx">faqs</a>


With this style link:


<a href="(!TopicLink Name='faq'!)">faqs</a>

However I have several cases where I have links passing parameters in the URL (querystring). How should I do that with a link like the example below?

<a href="t-mytopic.aspx?year=2008&code=34&id=1">mytopic</a>


asked Aug 14, 2018 in MultiStore by Yan Kleber (1,205 points)

1 Answer

0 votes
Best answer

Off hand I can think of two ways adding the query string. The 1st is to take token that is close the the example text allready or using the XSLTExtensionBase functions.

Which makes the token example something like:

<a href="(!TopicLink Name='faq'!)?year=2008&code=34&id=1">faqs</a>

and the XSLTExtensionBase example something like:

<xsl:variable name="topicInfo">
	<param name="Name" value="mytopic" />
	<param name="year" value="{year}" />
	<param name="code" value="{code}" />
	<param name="id" value="{id}" />
<a href="{aspdnsf:BuildRoute('Detail', 'Topic', msxsl:node-set($topicInfo) , 'true')}">faqs</a>

Hope that helps

answered Aug 15, 2018 by mmcgeachy (4,645 points)
selected Aug 15, 2018 by Yan Kleber

Cool, this is an excellent answer, thank you mmgeachy!

Unfortunatelly I cannot test it right away because as I mentioned we are still going to upgrade and at the moment I am only evaluating the impact on my existing packages.

Both suggestions look great. The first is very straight forward and the second extremely elegant. Anyway, whatever that works... Heck, I am looking forward to try them both!

Thanks again!