Page builder in Core

lawrence whittemore asked on June 3, 2021 14:41

Which is the proper way to set page builder up in a core site. the documentation shows these tags

@Html.Kentico().PageBuilderStyles()          
@Html.Kentico().PageBuilderScripts()      
@Html.Kentico().EditableArea("area1")

but the dancing goat template has these( with similarly written script and css tags)

<editable-area area-identifier="area1"
               area-options-allowed-widgets="AreaRestrictionHelper.GetHomePageRestrictions()"
               allow-widget-output-cache="true" widget-output-cache-expires-after="TimeSpan.FromMinutes(5)" />

is there a proper way, and where in the documentation (if it is in there) can I find info on the second way that dancing goat uses?

Recent Answers


Liam Goldfinch answered on June 3, 2021 14:57

Hi Lawrence,

Dancing Goat uses Tag Helpers created for Xperience instead of the equivalent HTML Helpers, which are documented here.

You can use whichever you prefer.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on June 3, 2021 15:46 (last edited on June 3, 2021 15:55)

Thanks, So I have added all the scripts, added the pagebuilder stuff to my start up, and added the tags to the template, but nothing shows in the pages section.

When I inspect the page in the admin, I see it has added this, <div data-kentico-default-section="Kentico.DefaultSection" data-kentico-editable-area-id="area1"></div>

but I don't see anything in the admin, and the only error I see in the console is a missing map file.

Also, I am using content tree based routing, so I have no custom routes or controllers.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on June 3, 2021 17:34

So I just figured this out, it was because I didn't have any registered widgets or anything to put in the pagebuilder, after building a widget It shows for me!

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on June 3, 2021 17:44

So I now get an error after adding a widget and saving the page. System.NullReferenceException: 'Object reference not set to an instance of an object.'

then there is this in the event log

VirtualContextHashValidationFailed

0 votesVote for this answer Mark as a Correct answer

Nathan Kerferd answered on June 7, 2021 13:57 (last edited on June 7, 2021 13:59)

0 votesVote for this answer Mark as a Correct answer

James Phillips answered on June 7, 2021 15:14 (last edited on June 7, 2021 15:14)

VirtualContextHashValidationFailed - Could this be because of a mismatch of the CMSHashStringSalt app setting between the CMS site and MVC site? Just a guess..

Might be worth making sure they are the same and re-signing the macros

0 votesVote for this answer Mark as a Correct answer

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