Add custom topic to header menu

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Jackluv wrote:
thanks mate.

I want to add in the header menu bar.

If you take a look at onthegreen.no, I want to add it to the red horizontal bar with FORSIDEN NYTT GOLFUTSTYR SØK MIN KONTO KONTAKT OSS.

What view is that?

As you probably understand, Im a noob at this :)

Views/Common/Menu.cshtml. :D

Version 2.7
I created a new Topic Page with system name "Links". Now I want to add it to the lower left side menu.

I tried to open the "Views/Common/Menu.cshtml" File in Dream weaver and it gets error, "No program associated with this file".

Note: I understand that isn't the right file for the left menu, but I just wanted to take a look.

Questions:
1: What file to I need to edit to make my new page appear in the lower left menu.
2: If it is a cshtml file, how do I edit that? :(

Thanks.


1. This is a custom theme. You have to check the View to know it, we can't help you as we don't have the views.
2. Any text editor, including NotePad. :)
11 years ago
wooncherk wrote:
thanks mate.

I want to add in the header menu bar.

If you take a look at onthegreen.no, I want to add it to the red horizontal bar with FORSIDEN NYTT GOLFUTSTYR SØK MIN KONTO KONTAKT OSS.

What view is that?

As you probably understand, Im a noob at this :)

Views/Common/Menu.cshtml. :D

Version 2.7
I created a new Topic Page with system name "Links". Now I want to add it to the lower left side menu.

I tried to open the "Views/Common/Menu.cshtml" File in Dream weaver and it gets error, "No program associated with this file".

Note: I understand that isn't the right file for the left menu, but I just wanted to take a look.

Questions:
1: What file to I need to edit to make my new page appear in the lower left menu.
2: If it is a cshtml file, how do I edit that? :(

Thanks.

1. This is a custom theme. You have to check the View to know it, we can't help you as we don't have the views.
2. Any text editor, including NotePad. :)


I see a workaround... I dont need the page "Shipping & Returns" with system name "Shippinginfo".

If I change that to Links without changing the system name, will that work? Even though the url wont be correct, I guess I can live with it.

I changed it already and it did not change on the site. Is that due to propagate?
11 years ago
Jackluv wrote:
thanks mate.

I want to add in the header menu bar.

If you take a look at onthegreen.no, I want to add it to the red horizontal bar with FORSIDEN NYTT GOLFUTSTYR SØK MIN KONTO KONTAKT OSS.

What view is that?

As you probably understand, Im a noob at this :)

Views/Common/Menu.cshtml. :D

Version 2.7
I created a new Topic Page with system name "Links". Now I want to add it to the lower left side menu.

I tried to open the "Views/Common/Menu.cshtml" File in Dream weaver and it gets error, "No program associated with this file".

Note: I understand that isn't the right file for the left menu, but I just wanted to take a look.

Questions:
1: What file to I need to edit to make my new page appear in the lower left menu.
2: If it is a cshtml file, how do I edit that? :(

Thanks.

1. This is a custom theme. You have to check the View to know it, we can't help you as we don't have the views.
2. Any text editor, including NotePad. :)

I see a workaround... I dont need the page "Shipping & Returns" with system name "Shippinginfo".

If I change that to Links without changing the system name, will that work? Even though the url wont be correct, I guess I can live with it.

I changed it already and it did not change on the site. Is that due to propagate?


You can change the display name to whatever you want no problem. I don't think there is a propagate issue here. You might have done it incorrectly. :)
11 years ago
I dont see how I could mess that up.

content/topics/title

Change the title to "Links" is what I did.

I closed and opened, refreshed about 10 times. Restart the app... Still it says "Shipping and Returns". LOL
11 years ago
wooncherk wrote:
thanks mate.

I want to add in the header menu bar.

If you take a look at onthegreen.no, I want to add it to the red horizontal bar with FORSIDEN NYTT GOLFUTSTYR SØK MIN KONTO KONTAKT OSS.

What view is that?

As you probably understand, Im a noob at this :)

Views/Common/Menu.cshtml. :D

Version 2.7
I created a new Topic Page with system name "Links". Now I want to add it to the lower left side menu.

I tried to open the "Views/Common/Menu.cshtml" File in Dream weaver and it gets error, "No program associated with this file".

Note: I understand that isn't the right file for the left menu, but I just wanted to take a look.

Questions:
1: What file to I need to edit to make my new page appear in the lower left menu.
2: If it is a cshtml file, how do I edit that? :(

Thanks.

1. This is a custom theme. You have to check the View to know it, we can't help you as we don't have the views.
2. Any text editor, including NotePad. :)

I see a workaround... I dont need the page "Shipping & Returns" with system name "Shippinginfo".

If I change that to Links without changing the system name, will that work? Even though the url wont be correct, I guess I can live with it.

I changed it already and it did not change on the site. Is that due to propagate?

You can change the display name to whatever you want no problem. I don't think there is a propagate issue here. You might have done it incorrectly. :)


OIC Now...
Obviously, its not going to change the Lower left menu, but only the page title after you click it.

Im back where I started. I want to make a page called "Links". So that I can swap links with other websites.. But I want to page to have a link on the home page so users can click it.

Is there another way to do that?
11 years ago
Jackluv wrote:
I dont see how I could mess that up.

content/topics/title

Change the title to "Links" is what I did.

I closed and opened, refreshed about 10 times. Restart the app... Still it says "Shipping and Returns". LOL


The text "Shipping & Returns" is most likely hard-coded in your view. So you have to change your view. :)
11 years ago
How do I change my view? that cshtml page in notepad?
11 years ago
Jackluv wrote:
How do I change my view? that cshtml page in notepad?


Yeap! Find the correct view, and change it in notepad. :)
11 years ago
OK, I already created a new topic page called Links. Do I want to add that to the "infoblock"

To do that, I go to Views/Common/infoblock.cshtml Correct?

I want the "Links" to appear after the "About Us" in the left lower menu.

If that is correct, here is the code there. How do I make that happen. :)

Code

@model InfoBlockModel
@using Nop.Web.Models.Common;
<div class="block block-info">
    <div class="title">
        <strong>@T("Information")</strong>
    </div>
    <div class="clear">
    </div>
    <div class="listbox">
        <ul>
            @Html.Widget("infoblock_before")
            <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a> </li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "aboutus" })">@T("AboutUs")</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>
            }
            @if (Model.RecentlyAddedProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("RecentlyAddedProducts")">@T("Products.NewProducts")</a></li>
            }
            @if (Model.RecentlyViewedProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("RecentlyViewedProducts")">@T("Products.RecentlyViewedProducts")</a></li>
            }
            @if (Model.CompareProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("CompareProducts")">@T("Products.Compare.List")</a></li>            
            }
            @if (Model.SitemapEnabled)
            {
                <li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
            }
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "shippinginfo" })">@T("ShippingReturns")</a></li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "privacyinfo" })">@T("PrivacyNotice")</a></li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "conditionsofUse" })">@T("ConditionsOfUse")</a></li>
            @Html.Widget("infoblock_after")
        </ul>
    </div>
</div>
11 years ago
Jackluv wrote:
OK, I already created a new topic page called Links. Do I want to add that to the "infoblock"

To do that, I go to Views/Common/infoblock.cshtml Correct?

I want the "Links" to appear after the "About Us" in the left lower menu.

If that is correct, here is the code there. How do I make that happen. :)

Code

@model InfoBlockModel
@using Nop.Web.Models.Common;
<div class="block block-info">
    <div class="title">
        <strong>@T("Information")</strong>
    </div>
    <div class="clear">
    </div>
    <div class="listbox">
        <ul>
            @Html.Widget("infoblock_before")
            <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a> </li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "aboutus" })">@T("AboutUs")</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>
            }
            @if (Model.RecentlyAddedProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("RecentlyAddedProducts")">@T("Products.NewProducts")</a></li>
            }
            @if (Model.RecentlyViewedProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("RecentlyViewedProducts")">@T("Products.RecentlyViewedProducts")</a></li>
            }
            @if (Model.CompareProductsEnabled)
            {
                <li><a href="@Url.RouteUrl("CompareProducts")">@T("Products.Compare.List")</a></li>            
            }
            @if (Model.SitemapEnabled)
            {
                <li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
            }
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "shippinginfo" })">@T("ShippingReturns")</a></li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "privacyinfo" })">@T("PrivacyNotice")</a></li>
            <li><a href="@Url.RouteUrl("Topic", new { SystemName = "conditionsofUse" })">@T("ConditionsOfUse")</a></li>
            @Html.Widget("infoblock_after")
        </ul>
    </div>
</div>


Changing this line:

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

should do the trick. :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.