Adding a new "Topic" page to main navigation menu

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello,

First off, I have now read all 289 pages of the manual so... Please, don't ask me to "RTFM"... LOL.

My question is...

Once I use the Content Manager in the Admin area to create a new "Topic" (i.e. a new page), how do I get it to appear in the main navigation menu?

Thanks,
nopCanuck
12 years ago
nopCanuck wrote:
Hello,

First off, I have now read all 289 pages of the manual so... Please, don't ask me to "RTFM"... LOL.

My question is...

Once I use the Content Manager in the Admin area to create a new "Topic" (i.e. a new page), how do I get it to appear in the main navigation menu?

Thanks,
nopCanuck


To get your new topic to show up under the main navigation menu you would need to alter the Menu.cshtml file. This menu (to the best of my knowledge) is not dynamic.
12 years ago
Thanks Slyler:

Afte add the topic page I added a line some like:
    
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "faqpg" })">@T("Faq")</a></li>


got a:
http://omdsite.com/servicios/pics-varios/add-faq-to-nop.jpg

Thanks
12 years ago
ok, some help here I added a topic.
I want to add a reference to this.
http://www.zonintech.com/t/DELL_config

<ul class="topmenu">
    <li><a href="@Url.RouteUrl("HomePage")">@T("HomePage")</a></li>
    <li><a href="@Url.RouteUrl("HOW DO I KNOW WHAT TO PUT HERE?")">@T("HOW DO I KNOW WHAT TO PUT HERE?")</a></li>
    @if (Model.RecentlyAddedProductsEnabled)
    {
        <li><a href="@Url.RouteUrl("RecentlyAddedProducts")">@T("Products.NewProducts")</a>
        </li>
    }
    <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
    <li><a href="@Url.RouteUrl("CustomerMyAccount")">@T("Account.MyAccount")</a></li>
    @if (Model.BlogEnabled)
    {
        <li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
    }
    @if (Model.ForumEnabled)
    {
        <li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
    }
    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.HeaderMenu })
</ul>
12 years ago
Hi,

I triued the solution and it did work.
I did:

Change the menu.cshtml in the \Deployable\nop_2.20\Views\Common directory and I had the line

<li><a href="@Url.RouteUrl("Topic", new { SystemName = "faqpg" })">@T("Faq")</a></li>
at the end before contact.

According to the menu code, this line should be read because the forum has been enabled in the admin section :@if (Model.ForumEnabled)
so it should go inside the if statement. But it didn't .. please tell me what i'm doing wrong it will be very appreciated

@model Nop.Web.Models.Common.MenuModel

<ul class="topmenu">
    <li><a href="@Url.RouteUrl("HomePage")">@T("HomePage")</a></li>
    @if (Model.RecentlyAddedProductsEnabled)
    {
        <li><a href="@Url.RouteUrl("RecentlyAddedProducts")">@T("Products.NewProducts")</a>
        </li>
    }
    <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
    <li><a href="@Url.RouteUrl("CustomerMyAccount")">@T("Account.MyAccount")</a></li>
    @if (Model.BlogEnabled)
    {
        <li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
  
    }
    @if (Model.ForumEnabled)
    {
        <li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
    }
   <li><a href="@Url.RouteUrl("Topic", new { SystemName = "faqpg" })">@T("Faq")</a></li>
    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.HeaderMenu })
</ul>
12 years ago
Hi there

I did not get it working simply adding a new Topic Page to the main menu.

I want to add the existing AboutUs page to the main menu in views/Common/Menu.cshtml

Thought it would be as easy as copy
    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
and past/change it to     <li><a href="@Url.RouteUrl("AboutUs")">@T("AboutUs")</a></li>

but this creats an error.

a) any idea how to do this properly (also with new pages)
b) will the changes be overwritten on updates?
c) make this a feature to show Topic pages in main menu.

Markus
12 years ago
marktold wrote:
Hi there


a) any idea how to do this properly (also with new pages)

I do now

<li><a href="@Url.RouteUrl("Topic", new { SystemName = "AboutUs" })">@T("AboutUs")</a></li>

b) will the changes be overwritten on updates?


YES

c) make this a feature to show Topic pages in main menu.

Vote for it here http://nopcommerce.codeplex.com/workitem/9142


Markus
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.