Close

Add Topic Page in a Vertical Menu

konstantinoskok
7 years ago
#12982 Quote
Avatar
  • 3
Hello I would like to ask if I can create a vertical menu in left side, like Gategories but to use Topic Pages with submenu too. The Topics will be pages which will have content for the company website like profile, history etc.

Is a way to do something like that?
Thank you in advance
anton_ivanov
7 years ago
#12987 Quote
Avatar
  • Moderator
  • 277
Hello,

This cannot be done out of the box if you are not using the Nop Pavilion Theme, because the Nop Pavilion theme already has a side (vertical ) category menu. Can you please specify what theme you are using?
Regards,
Anton Ivanov
Nop-Templates.com
konstantinoskok
7 years ago
#13011 Quote
Avatar
  • 3
Hello and Happy New Year,

I use Tiffany's Template. What I have done so far is to create a new menu by declare it in a specific widgetzone and after that through the plugin I add Menu Items Topic Pages with subpages (drag and drop) and in General Settings I choose Show DropDowns on Click. It works in a way but I have to show it in specific pages and not to all topics.
So inside the _ColumnsTwo.cshtml I add the next part

if (controllerName == "Topic")
            {
                
                <script>
                    $('.block-category-navigation').remove();
                                   </script>
//That's because it shows me the category-navigation menu in left side
                <div class="block block-category-navigation sideinfo">
                    <div class="listbox">
                        @Html.Widget("topic_navigation_menu")
                    </div>
                </div>
            }


* topic_navigation_menu is my widget

Is there another way by using this template or to continue what i have done so far?

Thank you in advance!!

anton_ivanov
7 years ago
#13015 Quote
Avatar
  • Moderator
  • 277
Hello,

You are on the right track. You will probably need to adjust your styling in order for the Mega Menu to display correctly where the Category Navigation is usually displayed, though.

Also, I cannot fully get the picture here. Do you want this Side Menu to display only when you are on a Topic Page or you want it to display every time you are in two columns layout page?

Note: Code customizations is out of the scope of our support. That being said I can guide you in order for you to take the right path.

Regards,
Anton Ivanov
Nop-Templates.com
konstantinoskok
7 years ago
#13030 Quote
Avatar
  • 3
Thank you for your help.

I want that sidemenu to have it in specific topics it's about information for the store such as aboutUs, History and so on.

yes i adjust the styling and i have the result which i want without touch any javascript part.

Thank you!

With Regargs,
Konstantinos
anton_ivanov
7 years ago
#13040 Quote
Avatar
  • Moderator
  • 277
Hello Konstantinos,

This is how you distinguish different topic pages:

You can use the following code to ensure you are on a topic details page. If you are both of those rows should return true.
Url.RequestContext.RouteData.Values["controller"].ToString().Equals("Topic", StringComparison.InvariantCultureIgnoreCase)
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("TopicDetails", StringComparison.InvariantCultureIgnoreCase)


Also, the topic details page uses the TopicModel. You can distinguish between topic pages by their Title(Model.Title) or SystemName(Model.SystemName).

Hope that helps!

Regards,
Anton Ivanov
Nop-Templates.com