Here is a snippet which will immediately populate the infoblock with new topics/pages added via the Content Management area in NopCommerce.
Rules - (or rather, the trick...)
All new Topics which you want automatically displayed in the Infoblock, you simply need to append "Page." to its NAME (not the page title, the topic(system) name)
So if I want to add a new topic "The Management Team" and have it linked automatically, I add a new topic, and NAME it e.g. Page.TheManTeam, then proceed giving the Topic Title - "The Management Team" and adding its content.
This is for a start, and can be ported into the classfile for InfoBlock rather easily and replaced client-side with a control instead (ye ye i know), but this was quick and easy and needed no recompiling :)
Code to be inserted in:
~/Modules/InfoBlock.ascx
I inserted it just below About Us at:
<li><a href="<%=Page.ResolveUrl("~/aboutus.aspx")%>">
<%=GetLocaleResourceString("Content.AboutUs")%></a></li>
<%
var topics = this.TopicService.GetAllTopics();
topics = topics.FindAll(t => t.Name.ToLower().IndexOf("page")==0);
foreach (var topic in topics)
{
NopSolutions.NopCommerce.BusinessLogic.Content.Topics.LocalizedTopic localizedTopic = this.TopicService.GetLocalizedTopic(topic.TopicId, NopContext.Current.WorkingLanguage.LanguageId);
if (localizedTopic != null && !String.IsNullOrEmpty(localizedTopic.Title))
{
string topicURL = SEOHelper.GetTopicUrl(localizedTopic.TopicId, localizedTopic.Title);
string topicName = localizedTopic.Title;
%>
<li style="margin-left: 5px"><a href="<%=topicURL%>">
<%=topicName%>
</a></li>
<%
}
}
%>
Hopefully you guys move further with it (keep it simple) e.g. it can also now be tweaked to populate the navbar with a drop down for instance. Even isolate those items further by creating a name rule for that block e.g. Page.TopMenu.MyTopicName, where the change is merely in:
topics = topics.FindAll(t => t.Name.ToLower().IndexOf("page.topmenu")==0);
... up to you :)
Enjoy!