I have a template for the details view of a single product. In this template it lists the "tags" and "categories" with links to view products of the same tag or category.
I define the links for the tags and categories in the same way but they are rendered differently.
here is my template:
<link rel="stylesheet" href="@App.Path/assets/portfolio.css" data-enableoptimizations="bottom"/>
<div class="sc-element">
<div class="ks-portfolio-detail">
<div class="row">
<div class="col-sm-12 col-md-6">@Edit.Toolbar(Content)
<img src="@Content.Image" alt="@Content.UrlKey" class="img-responsive" />
</div>
<div class="col-sm-12 col-md-6">
<div class="ks-title"><h1>@Content.Title</h1></div>
...
<div class="ks-lable">Categories:</div>
@{ int count=0; }
@foreach(var item in AsDynamic(Content.Categories)){
count++;
<a href="@Link.To(parameters: "category=" + @item.Title)" title="@item.Title">@item.Title</a>
@(count < Content.Categories.Count?" | ":"")
}
<br/><br/>
<div class="ks-lable">Tags:</div>
@{ int counter=0; }
@foreach(var item in AsDynamic(Content.Tags)){
counter++;
<a href="@Link.To(parameters: "tag=" + @item.Name)" title="@item.Name">@item.Name</a>
@(counter < Content.Tags.Count?" | ":"")
}
</div>
</div>
</div>
</div>
Please note the lines where the category and tag links are created:
<a href="@Link.To(parameters: "category=" + @item.Title)" title="@item.Title">@item.Title</a>
...
<a href="@Link.To(parameters: "tag=" + @item.Name)" title="@item.Name">@item.Name</a>
PROBLEM
The tags Link.To renders the link with "slashes" like:
http://dnn804/portfolio/tag/Demo2
but the category renders the link like:
http://dnn804/portfolio?category=Flowers
QUESTION
Can someone help me figure out why these links are rendered differently when using the same function? I want them both to appear like the "tags" link.
Thanks in advance.