Close

How to display Tab content on N-C topic page?

maxkomarov
12 years ago
#604 Quote
Avatar
  • 6
I have two customs tabs for my products: model description tab and prototype description tab. But I need to have possibility to display content of these tabs outside of product container using your catgorized header menu for navigation and topics as targets for menu items.
Please help.

Thank you,
Support
12 years ago
#607 Quote
Avatar
  • Moderator
  • 1044
maxkomarov wrote:
I have two customs tabs for my products: model description tab and prototype description tab. But I need to have possibility to display content of these tabs outside of product container using your catgorized header menu for navigation and topics as targets for menu items.
Please help.

Thank you,


Hi Max,

Just to make sure we are on the same page - You want to have links to some topic pages in the Header Menu and you want to have the content of some of your tabs to be shown on the Topic pages?

Adding links to topic pages is pretty easy just take a look at the Header Menu Razor view file SevenSpikes.Nop.Plugins.CategoriesHeaderMenu\Views\CategoriesHeaderMenu.cshtml

Unfortunately the Topic pages in nopCommerce are simply static html pages and you can't execute any Razor syntax in them. So it is not possible to show the content of a given tab inside a Topic page in nopCommerce.

You can create two topics and copy the content of your two tabs in these topics.
So you will have two topics named - Model and Prototype
Then in the Header menu file add these two lines:
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "Model" })">Model</a></li>
        <li><a href="@Url.RouteUrl("Topic", new { SystemName = "Prototype" })">Prototype</a></li>


This way you will add links to your two topic pages.

Let us know if this answers your question.

Best Regards,
Nop-Tempaltes Support Team