1

How can I manipulate the vanity element in a url node? This is more of a general question, because I know I can get by with vanity={2}, but a lack of proper understanding is holding me back from truly mastering my community server site.

I've seen examples like this in the SiteUrls.config:

<url name="post_InPage_Old"  path = "{0}/ShowThread.aspx#{1}" pattern = "(\d+)/ShowThread.aspx" vanity="{2}?PostID=$1^PermaPost=$2^UrlName=permalink" page="ForumUrlHandler.ashx" />

but the format confuses me. What are the $1 and $2? Where are they set?

flag

1 Answer

1

$1 and $2 represent that matched set (anything with '()' ) found in the regular expression (pattern). More info about matched sets found here http://www.webreference.com/js/column5/backreferences.html

link|flag
Welcome to SnippetGood :) – miss snippet Nov 4 at 21:55

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.