Is there a way to create page builder cross sells?

Matt Larrabee asked on December 9, 2021 15:13

I have a client who wants a lot of flexibility when creating cross sells. I know it's recommended to use structured content for one to many items like cross sells, but is there a way to have a page type with a page builder, then include that page type as a cross sell on a bunch of other pages.

The idea would be to have that 1 to many relationship but still give the client the ability to edit the cross sells with the page builder.

Thanks!

Recent Answers


David te Kloese answered on December 9, 2021 21:58

so what are they editing? Is it an actual page? Isn't a cross sell item usually displayed relatively small?

Or do you just want to use (part) of the data entered in this page's Page Builder on another page?

0 votesVote for this answer Mark as a Correct answer

Matt Larrabee answered on December 9, 2021 23:03

Hi David, I was hoping to use the whole page builder output of a cross sell page type on a number of pages. (So on a normal page you'd select what cross sells you want to display on the page, and it will pull the page builder of those cross sells and include them on the page) The cross sell would include a photo, multiple CTAs up to about 10. The client requested being able to update these cross sells in the same way they do widgets in a page builder view, that's why I'm asking if it's possible and also weighing the performance sacrifices if it is possible. Thanks!

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on December 10, 2021 09:14

Not sure if this is what you mean, but have a look at this doc:

docs.xperience.io/.../rendering-widgets-in-code

This talks about rendering widgets without editable region.

You need to fill the IWidgetProperties object representing the widget's properties, and get that data from another source.

0 votesVote for this answer Mark as a Correct answer

Matt Larrabee answered on December 10, 2021 14:51

Thanks for sending that, it looks like it might possibly work. It looks like that or RenderNestedWidget can display a standalone widget when you pass it the Widget Identifier and the properties to fill the widget.

The thing I'm going to look in to is if you can have a page type with a single widget and get the properties from that to add as the properties argument in the RenderStandalone/RenderNestedWidget function

I'll let you know if I find a way and Mark your answer correct if it's possible.

Thanks!

0 votesVote for this answer Mark as a Correct answer

Sean Wright answered on January 5, 2022 00:06

Matt,

Not sure if I'm misreading your question, but I thought it was worth mentioning that you can't limit the number of Widgets that a content manager adds to a <widget-zone>, so you can't "have a page type with a single widget".

0 votesVote for this answer Mark as a Correct answer

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