Am trying to get all our blog entries added to the sitemap.xml as we're adding 2 or 3 a week.
Having read round - I have all the "commonsettings.sitemap "
Have found the sitemap.cshtml file in /views/ and have looked at the existing code for products and categories and added my own for the blogs to try and get them all to be included in the sitemap.xml :
@if (Model.Blog.Count > 0)
{
<div class="entity">
<div class="entity-title">
<h2>@T("Sitemap.Blog")</h2>
</div>
<div class="entity-body">
<ul>
@foreach (var product in Model.Blog)
{
<li><a href="@Url.RouteUrl("Blog", new { SeName = product.SeName })">@blog.Name</a></li>
}
</ul>
</div>
</div>
}
I have tried both "blog" and "blogs" - but nothing appears in the sitemap.xml.
Any ideas?
I don't want to add another plugin - just code this directly into the view file.
I am not particularly technical - so this is about as far as my knowledge extends!
Thanks for any help.
Cheers
TW