Skip to content

Commit 2e5cc82

Browse files
committed
Pager and category widget links in sub-blog
1 parent 14fc8b5 commit 2e5cc82

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

BlogEngine/BlogEngine.NET/AppCode/Controls/PostPager.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ private static string PageUrl()
184184
path += "?";
185185
}
186186

187+
if(!path.Contains(".aspx", StringComparison.OrdinalIgnoreCase))
188+
{
189+
if(path.EndsWith("?") && !path.EndsWith("/?"))
190+
{
191+
path = path.Replace("?", "/?");
192+
}
193+
}
194+
187195
return HttpUtility.HtmlEncode(path + "page={0}");
188196
}
189197

BlogEngine/BlogEngine.NET/Custom/Widgets/CategoryList/widget.cshtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
var title = Model.Title;
55
var dic = CategoryList.SortCategories();
66

7+
var categoryUrl = Utils.RelativeWebRoot + "category";
8+
79
var settings = Common.GetSettings(Model.Id);
810
bool showRssIcon = true;
911
bool showPostCnt = true;
@@ -36,11 +38,11 @@
3638
}
3739
@if (showRssIcon == true)
3840
{
39-
<a rel="nofollow" href="~/category/feed/@Utils.RemoveIllegalCharacters(cat.Title)">
41+
<a rel="nofollow" href="@categoryUrl/feed/@Utils.RemoveIllegalCharacters(cat.Title)">
4042
<img class="rssButton" alt="RSS feed for SubBlog" src="~/Content/images/blog/rssButton.png">
4143
</a>
4244
}
43-
<a title="Category: @cat.Title" href="~/category/@Utils.RemoveIllegalCharacters(cat.Title)">
45+
<a title="Category: @cat.Title" href="@categoryUrl/@Utils.RemoveIllegalCharacters(cat.Title)">
4446
@cat.Title
4547
@if (showPostCnt)
4648
{

0 commit comments

Comments
 (0)