4

We have a Sitecore branch with a number of items being created, e.g. Gallery + 4 Gallery items.

We have created a rendering for the Gallery with a placeholder, and a rendering for the Gallery items (to be used per Gallery item).

When adding a Gallery rendering to a placeholder through Experience Editor, and using the branch to create a new Gallery, we are missing the Gallery items renderings from the Page Layout.

Is there a simple way that the 4 Gallery items renderings can be added to the Page Layout also? (not manual)

We want the Gallery items to be controlled via Experience Editor, to be able to add and remove items, change ordering, etc.

We are on Sitecore 8.1 Update 3

1 Answer 1

1

What is the purpose of Gallery component? Does it holds empty placeholder only? If I understand your approach you want to add Gallery Item renderings to that empty placeholder once you create data source from branch.

I am not sure if this is the right approach to build composite components, because there is no simple way to do this.

Normally you would add your Gallery Item rendering on Gallery Item template so when you create Gallery your all Gallery items have rendering on theirs layout definition by default.

Then your Gallery rendering should point to a datasource and use each Gallery Item to obtain details from layout.

If you normally binds your Gallery Item rendering with fields from Gallery Item template, then you can dynamically render single Gallery Item rendering content inside Gallery rendering switching data item one by one.

To summarize. I think you should rethink your approach and create just single rendering and inject data from data items.

If I misunderstood your idea, let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.