Close

Modify header links

frutafresca
10 years ago
#3145 Quote
Avatar
  • 10
Hello,

We will begin to do some customization's to the NeoFashion Responsive Theme.

First we will add some menus in the "HeaderLinks.cshtml"

We see all links as the form:
<li><a href="@Url.RouteUrl("CustomerInfo")">@Model.CustomerEmailUsername</a></li>

So how we add new variables to the model?
We dont want add it in this way:
<li><a href="http://www.mynewurl.com/">mynewurl.com</a></li>

Thanks
Boyko
10 years ago
#3148 Quote
Avatar
  • Moderator
  • 1570
axiomax wrote:
Hello,

We will begin to do some customization's to the NeoFashion Responsive Theme.

First we will add some menus in the "HeaderLinks.cshtml"

We see all links as the form:
<li><a href="@Url.RouteUrl("CustomerInfo")">@Model.CustomerEmailUsername</a></li>

So how we add new variables to the model?
We dont want add it in this way:
<li><a href="http://www.mynewurl.com/">mynewurl.com</a></li>

Thanks


Hi axiomax,

If you want to add new variables to the Model you will need to have the source code version of nopCommerce and modify it, which we strongly recommend not to do as this will make your future upgrades much more difficult. If there are good reasons to change the model it is fine but changing  the model would be necessary if there is some new data in the database that you want to show dynamically. If it is just a link to some page it is better to simply add it, without modifying the Model.
If you are going to have a link to some predefined topic pages then you can search in nopCommerce to do so i.e about us pages etc. For some of the pages there are routes specified in nopCommerce, so you can use them as well i.e Contact Us page.

Hope this helps!

Thanks
Regards,
Nop-Templates.com Team