This is complete source code
-
getting error with your code
An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code
Additional information: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
Compiler Error Message: CS1061: 'Nop.Web.Models.Blogs.BlogPostModel' does not contain a definition for 'BodyOverview' and no extension method 'BodyOverview' accepting a first argument of type 'Nop.Web.Models.Blogs.BlogPostModel' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 67: {
Line 68:
Line 69: if (!String.IsNullOrEmpty(item.BodyOverview))
Line 70: {
Line 71: @Html.Raw(item.BodyOverview)
Hi, I applied this code on nopCommerce 3.7 and its work fine, you can try to run after clean & build your project
or you can use only this code in side post-body div :
@{ counter++;
if (counter == 3)
{
break;
}
}
@Html.Raw(!String.IsNullOrEmpty(item.BodyOverview) ? item.BodyOverview : item.Body)