1

I was told to do inline editing for Sitecore web site.

It is working for the simple page like an article page.

<sc:text ID="sct1" ruat="server" ... />

But if the page is more complicated, it is impossible now, i believe.

Sample page like ..

About Us will have 3 different radio buttons.

According to the button chosen, the respective content will show. That content is actually a child content of About Us.

And if I want inline editing, i have to check whether it is the editing mode

If so, I can show all 3 set contents.

And the user can edit it. But when he saves, only the main page is saved. the child pages are not saved.

Do we have an alternate solution for that?

4

1 に答える 1

3

Your assertion is incorrect that when the page is saved, that only the item being rendered is saved. If you output a field from any item using a field renderer (as sc:text does behind the scenes), Sitecore will track that the item has been edited, and save the changes made.

You can populate the Item or Datasource property on sc:text in order to edit a field from another item.

Example syntax when data binding an Item object:

<sc:Text runat="server" ID="uxNameText" Field="Name" Item="<%#Container.DataItem%>" />

Or Datasource can be used to bind an item path (not recommended) or ID (a bit better):

<sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server" />

You can also populate either Item or Datasource in your codebehind.

As an alternative, utilize a framework such as Custom Item Generator to create a .NET class that will allow you to easily output field values from any item in a way that will support inline editing.

References:

http://blog.velir.com/index.php/2010/10/19/custom-item-generator/

http://www.techphoria414.com/Blog?tag=custom+item+generator

于 2013-01-21T17:10:59.203 に答える