Page Builder/ Landing page

vendim Birbili asked on April 22, 2019 20:47

HI, I am following the tutorial to build a landing page (Kentico MVC - Builders) : Creating a Builder - enabled website. I follow step by step and I dont get the option to see page sections or view the page on the MVC live site. this is very Crucial to the project that we are working so please can you let me know if I am doing something wrong or something is missing on the tutorial

Recent Answers


David te Kloese answered on April 23, 2019 09:58

So Do you see the live site at all?

Can you verify the Presentation URL in the sites application is correct, and the full one including protocol.


do you have the page builder code initiated application wide?

as part of you app start something like:

builder.UsePreview();
builder.UsePageBuilder(
    new PageBuilderOptions()
        { DefaultSectionIdentifier = "MyCode.DefaultSection" }
);

in your controller:

HttpContext.Kentico().PageBuilder().Initialize(model.DocumentID);

Make sure it's the Document ID and NOT the Node ID.


In your page view: @Html.Kentico().EditableArea("areaX", allowedWidgets: new[] { "MyCode.TeaserWidget" })


regarding the section itself, make sure you have the registration correct:

[assembly: RegisterSection("MyCode.SingleColumnSection", typeof(SingleColumnSectionController), "Singlecolumn", IconClass = "icon-square")]


In the Action of the section controller check the path to the partial view:

public ActionResult Index()
{
    return PartialView("Sections/_SingleColumnSection");
}

In the partial view of the section just initiate the Kentico Zone logic:

@Html.Kentico().WidgetZone()

Hope any of this helps...

1 votesVote for this answer Mark as a Correct answer

vendim Birbili answered on April 23, 2019 23:27

thanks For the reply. the issue that I am having is that on the CMS side of it. On the Live site the empty page renders. On the Admin site of It I get 404 on the Page tab ( only for that page type). I am not sure what is complaining about.

0 votesVote for this answer Mark as a Correct answer

vendim Birbili answered on April 23, 2019 23:47

I figure it out. It was something with URL Pattern on the Page Type Setting for that particular page. Finally I make it work . thanks for the Assistance

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.