Harsha
Harsha

Reputation: 1

Sitecore Page Editor issue

I was trying to move components in Page Editor mode , and below are the things I have done to achieve this :

  1. Set Compatible rendering selected for the Sublayouts
  2. Added placeholder settings and allowed controls for placeholders

But , when I was trying to move components, the DataSourceItems for the sublayouts are not changing , hence the content is not changing.

And , also sometime I am getting Field related errors if the fields are different in the DataSources.

Can someone please help me in this .

Upvotes: 0

Views: 933

Answers (2)

Jay S
Jay S

Reputation: 7994

From your question, it sounds like you are trying to move a component from one placeholder to another in Page Editor. That does not affect the data source.

If instead you mean you are trying to personalize the experience by using rules to switch the data source within a sublayout, the steps you've taken won't allow for that. You need to add conditions to the sublayout in Page Editor to choose which data source you want to display.

If you are trying to have compatible renderings (different sublayouts) show for the same placeholder, that is something that is done by your step 1. This is only to help authors know what other sublayouts would be a good idea to put in that placeholder. It does not affect the data source.

Upvotes: 1

Ruud van Falier
Ruud van Falier

Reputation: 8877

When you add components, the datasource for them is not set automatically. You need to check if it's set and use Sitecore.Context.Item if it's not.

Not sure if that's what you mean..

As for field related errors, please post more details.

Upvotes: 0

Related Questions