Reputation: 2667
What I am trying to grasp is the concept of how does adding multiple renderings enable us to define unique content to each rendering on the item.
What's the best way to go about this?
The following structure has been created in the content tree:
MyHome
-Content item 1
-Content item 2
-Content item 3
Going by the book Content item 1 - 3 are indivudal pages to be rendered.
What I know I should do is add these as renderings to MyHome using the ContentItem sublayout in presentation details, but I cannot see how they would get unique data? Maybe i missed a step in the training haha.
This is without using page editor, the current companies page editor is broken for content editors I have raised sitecore support calls seperately to deal with this.
Also posted this on: http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=47373
Update:
So looking into it I can define data source for renderings, what would be nice is that when use creates a content item that assigns MyHome with a rendering connected to the data source.
Upvotes: 0
Views: 170
Reputation: 31435
Renderings are modular and contain functionality that is separate from the data. You can read my blog post Using the DataSource Field with Sitecore Sublayouts on how to set this up. From there, you can add the same component to a page multiple times, each looking at a separate data source item to feed it data.
If you want this to be automatic, when you create an item, perhaps create it from a branch template and have that branch auto-create sub-items, then have the standard values assign a relative data source from that item being created, e.g. if creating Home from a branch, it auto-creates Content item 1, Content item 2, and Content item 3 below it, so the data sources could be something like ./Content item 1
, ./Content item 2
, ./Content item 3
. Just an idea.
Upvotes: 3