How to make nivo slider full page width?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Getting this error:


Server Error in '/' Application.

The "RenderSection" method has already been called for the section named "slider".
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The "RenderSection" method has already been called for the section named "slider".

Source Error:



Line 39: @if (IsSectionDefined("slider"))
Line 40: {
Line 41:     @RenderSection("slider")
Line 42: }
Line 43: <div class="columns-wrapper clearer">
9 years ago
Seem that something wrong in your view.

Here is entire markup code of my "_ColumnsThree.cshtml" view:

@{
    Layout = "~/Views/Shared/_Root.cshtml";
}
@{
    //current category ID
    int currentCategoryId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }


    //current manufacturer ID
    int currentManufacturerId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("manufacturer", StringComparison.InvariantCultureIgnoreCase))
    {
        currentManufacturerId = Convert.ToInt32(Url.RequestContext.RouteData.Values["manufacturerId"].ToString());
    }


    //current product ID
    int currentProductId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("product", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("productdetails", StringComparison.InvariantCultureIgnoreCase))
    {
        currentProductId = Convert.ToInt32(Url.RequestContext.RouteData.Values["productId"].ToString());
    }
}
@if (IsSectionDefined("slider"))
{
    @RenderSection("slider")
}
<div class="columns-wrapper clearer">
    <div class="leftside-3">
        @if (IsSectionDefined("left"))
        {
            @RenderSection("left")
        }
        else
        {
            @Html.Widget("left_side_column_before")
            @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
            @Html.Widget("left_side_column_after_category_navigation")
            @Html.Action("ManufacturerNavigation", "Catalog", new { currentManufacturerId = currentManufacturerId })
            @Html.Action("VendorNavigation", "Catalog")
            @Html.Action("PopularProductTags", "Catalog")
            @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
            @Html.Widget("left_side_column_after")
        }
    </div>
    <div class="rightside-3">
        @if (IsSectionDefined("right"))
        {
            @RenderSection("right")
        }
        else
        {
            @Html.Widget("right_side_column_before")
            @Html.Action("NewsletterBox", "Newsletter")
            @Html.Action("RecentlyViewedProductsBlock", "Product", new { productThumbPictureSize = 32 })
            @Html.Action("PollBlock", "Poll", new { systemKeyword = "RightColumnPoll" })
            @Html.Widget("right_side_column_after")
        }
    </div>
    <div class="center-3">
        @Html.Widget("main_column_before")
        @RenderBody()
        @Html.Widget("main_column_after")
    </div>
</div>
9 years ago
thank you Tuấn Đỗ you are great !!!!!!
9 years ago
Tuấn Đỗ

The homepage works fine but all my pages using the same ColumnThree page are aligned left and not centered.
9 years ago
pepper wrote:
Tuấn Đỗ

The homepage works fine but all my pages using the same ColumnThree page are aligned left and not centered.


Sorry, I missed to update the "_ColumnsOne.cshtml" and "_ColumnsTwo.cshtml" views.
Following are updated for them. (the underlined text are new code)

"_ColumnsOne.cshtml"

@{
    Layout = "~/Views/Shared/_Root.cshtml";
}
<div class="columns-wrapper clearer">
    <div class="center-1">
        @Html.Widget("main_column_before")
        @RenderBody()
        @Html.Widget("main_column_after")
    </div>
</div>


"_ColumnsTwo.cshtml"


@{
    Layout = "~/Views/Shared/_Root.cshtml";
}
@{
    //current category ID
    int currentCategoryId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }


    //current manufacturer ID
    int currentManufacturerId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("manufacturer", StringComparison.InvariantCultureIgnoreCase))
    {
        currentManufacturerId = Convert.ToInt32(Url.RequestContext.RouteData.Values["manufacturerId"].ToString());
    }


    //current product ID
    int currentProductId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("product", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("productdetails", StringComparison.InvariantCultureIgnoreCase))
    {
        currentProductId = Convert.ToInt32(Url.RequestContext.RouteData.Values["productId"].ToString());
    }
}
<div class="columns-wrapper clearer">
    <div class="side-2">
        @if (IsSectionDefined("left"))
        {
            @RenderSection("left")
        }
        else
        {
            @Html.Widget("left_side_column_before")
            @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
            @Html.Widget("left_side_column_after_category_navigation")
            @Html.Action("ManufacturerNavigation", "Catalog", new { currentManufacturerId = currentManufacturerId })
            @Html.Action("VendorNavigation", "Catalog")
            @Html.Action("NewsletterBox", "Newsletter")
            @Html.Widget("left_side_column_after")
        }
    </div>
    <div class="center-2">
        @Html.Widget("main_column_before")
        @RenderBody()
        @Html.Widget("main_column_after")
    </div>
</div>
9 years ago
pepper wrote:
Tuấn Đỗ

The homepage works fine but all my pages using the same ColumnThree page are aligned left and not centered.


How about it?
7 years ago
Hello,

How can I make nivo slider full page width nopCommerce 3.7 with Default Clean Theme?

Thank you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.