Create a table for Mega Menu

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 anni tempo fa
How to create a table for Mega Menu by follow the existing approach
7 anni tempo fa
Sachin Tripathi Ji wrote:
How to create a table for Mega Menu by follow the existing approach


Hi Sachin,
This code may help. This was something we worked on it and it is a bootstrap megamenu. You need to add picture to your catalog controller and model and can be changed according to your needs.

<li class="dropdown mega-dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="text-transform:capitalize">@category.Name<span class="glyphicon pull-right"></span></a>
            @if (category.SubCategories.Count > 0)
            {
                <ul class="dropdown-menu mega-dropdown-menu row">
                    <li class="col-sm-4">
                        <ul>
                            <div id="myCarousel" class="carousel slide" data-ride="carousel">
                                <div class="carousel-inner">
                                    @{string cclass = "item active";}
                                    @foreach (var subCategory in category.SubCategories)
                                    {
                                        <div class="@cclass" align="left">
                                            <a href="@Url.RouteUrl("Category", new { SeName = subCategory.SeName }) ">
                                                <img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src="@subCategory.Picture" width="444" height="333" alt="@subCategory.Name">
                                            </a>
                                        </div><!-- End Item -->
                                        cclass = "item";
                                    }
                                </div><!-- End Carousel Inner -->
                            </div><!-- /.carousel -->
                        </ul>
                    </li>
                    <li class="col-sm-8">
                        <ul class="mega-dropdown-menu row">

                            @foreach (var subCategory in category.SubCategories)
                            {
                                <li class="dropdown-header col-sm-2">
                                    <a class="dropdown-header" href="@Url.RouteUrl("Category", new { SeName = subCategory.SeName }) ">@subCategory.Name</a>
                                    @RenderCategoryLine(subCategory, level + 1, responsiveMobileMenu)
                                </li>
                            }
                        </ul>
                    </li>
                </ul>
            }
        </li>
7 anni tempo fa
Thanks sir.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.