Hello,
I've found the problem with this and have fixed it in our code.
To work around the problem, use the following view as an example. Basically, you ned need to add @using mojoPortal.Web;
to the top and then @SiteUtils.GetNavigationSiteRoot()
in front of each instance of @item.ItemUrl
and @Model.ModulePageUrl
.
@using mojoPortal.Web.Helpers;
@using mojoPortal.Business;
@using mojoPortal.Web; @*add mojoPortal.Web to this line *@
@model PostListModel
<div class="blog-postlist">
@foreach (var item in Model.Posts)
{
<article class="blog-postlist__item">
<header>
@if (!string.IsNullOrWhiteSpace(item.HeadlineImageUrl))
{
<figure class="blog-postlist__item-featured-image">
<img src="@item.HeadlineImageUrl" alt="@item.Title" />
</figure>
}
<h2 class="blog-postlist__title">
<a class="blog-postlist__item-link" href='@SiteUtils.GetNavigationSiteRoot()@item.ItemUrl'>@item.Title</a>
</h2>
@if (@item.SubTitle != "")
{
<h3 class="blog-postlist__sub-title">@item.SubTitle</h3>
}
</header>
<div class="blog-postlist__item-body">
@Html.Raw(item.Body)
</div>
<footer>
<div class="blog-postlist__metadata">
@if (item.ShowAuthorName)
{
<span class="blog-postlist__author">
@if (item.ShowAuthorAvatar && !item.ShowAuthorBio)
{
<span class="blog-postlist__author-avatar">
@Html.Avatar(item.AuthorAvatar, item.AuthorEmail, item.AuthorUserId, new { Class = "author__avatar" }, new { Class = "author__avatar-link" }, true, true)
</span>
}
<span class="blog-postlist__author-name">
@if (!item.ShowAuthorAvatar || item.ShowAuthorBio)
{
<i class="fa fa-user-circle"></i>
}
@item.AuthorDisplayName
</span>
</span>
}
<span class="blog-postlist__date"><i class="fa fa-clock-o"></i> @item.PostDate.ToString("MMMM dd, yyyy")</span>
@if (item.AllowCommentsForDays > -1)
{
<span class="blog-postlist__comments"><a class="blog-postlist__commentslink" href="@SiteUtils.GetNavigationSiteRoot()@item.ItemUrl#comments"><i class="fa fa-comments"></i> @Resources.BlogResources.BlogFeedbackLabel (@item.CommentCount)</a></span>
}
</div>
@if (item.ShowAuthorBio)
{
<div class="author__group author__group--blog-postlist media">
@if (item.ShowAuthorAvatar)
{
@Html.Avatar(item.AuthorAvatar, item.AuthorEmail, item.AuthorUserId, new { Class = "author__avatar media-object" }, new { Class = "author__avatar-link media-left" }, true, true)
}
@if (item.ShowAuthorBio && !string.IsNullOrWhiteSpace(item.AuthorBio))
{
<p class="author__bio media-body">@item.AuthorBio</p>
}
</div>
}
</footer>
</article>
}
<p><a href="@SiteUtils.GetNavigationSiteRoot()@Model.ModulePageUrl">View all posts</a> »</p>
</div>