Close

Change in Layout

drcomputer
11 years ago
#2019 Quote
Avatar
  • 33
when I change columnthree to columntwo in index.cshtml it is showing error. Please help me out
Boyko
11 years ago
#2020 Quote
Avatar
  • 1570
drcomputer wrote:
when I change columnthree to columntwo in index.cshtml it is showing error. Please help me out


Hi drcomputer,

Which version of nopCommerce do you use? What is the error?

Thanks
Regards,
Nop-Templates.com Team
drcomputer
11 years ago
#2021 Quote
Avatar
  • 33
Hi,
I am using Nopcommerce2.8 with electroncics theme. when I am changing _columnThree.cshtml to _columnTwo.cshtml in index.cshtml in \theme\electronics\view\home\index.cshtml, the site is showing errorpage.
Boyko
11 years ago
#2025 Quote
Avatar
  • 1570
drcomputer wrote:
Hi,
I am using Nopcommerce2.8 with electroncics theme. when I am changing _columnThree.cshtml to _columnTwo.cshtml in index.cshtml in \theme\electronics\view\home\index.cshtml, the site is showing errorpage.


Please refer to our nopCommerce troubleshooting guide to get the error message, so that we can help.

Thanks
Regards,
Nop-Templates.com Team
drcomputer
11 years ago
#2026 Quote
Avatar
  • 33
The level of log entry.Log level:   Error
The log entry message.Short message:   The following sections have been defined but have not been rendered for the layout page "~/Themes/Electronics/Views/Shared/_ColumnsTwo.cshtml": "MainSlider".
The details for the log entry.Full message:   System.Web.HttpException (0x80004005): The following sections have been defined but have not been rendered for the layout page "~/Themes/Electronics/Views/Shared/_ColumnsTwo.cshtml": "MainSlider". at System.Web.WebPages.WebPageBase.VerifyRenderedBodyOrSections() at System.Web.WebPages.WebPageBase.PopContext() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) at System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) at System.Web.WebPages.WebPageBase.Write(HelperResult result) at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) at System.Web.WebPages.WebPageBase.PopContext() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) a
Support
11 years ago
#2031 Quote
Avatar
  • Moderator
  • 1044
Hi drcomputer,

Open the ~/Themes/Electronics/Views/Shared/_ColumnsTwo.cshtml view.

You need to add the following code to the file on line 37 before the
<div class="master-wrapper-side-2"> line.

@if (IsSectionDefined("MainSlider"))
{
    @RenderSection("MainSlider")
}

<div class="master-wrapper-side-2">
....

Thus if you have a slider for the home page only it will be displayed below the header as it is when the home page is three columns.

drcomputer
11 years ago
#2032 Quote
Avatar
  • 33
Thanks You for your prompt response