在其他项目Sitecore的行内编辑 [英] Sitecore inline editing on other items

查看:73
本文介绍了在其他项目Sitecore的行内编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人告诉我做内联编辑 Sitecore的网​​站

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

据工作像一个文章页面的简单页面。

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

< SC:文本ID =SCT1ruat =服务器... />

但如果页面比较复杂,这是不可能的,现在,我相信了。

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

样页如..

关于我们将有3个不同的单选按钮。

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

如果是这样,我可以显示所有3集内容。

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?

推荐答案

您断言是不正确,当页面被保存,只有所呈现的项目将被保存。如果您使用的是外地渲染器输出的某个字段的任何物品(如 SC:文本做幕后),Sitecore的将跟踪该项目已被编辑,并保存更改的。

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.

您可以填充项目数据源 SC属性:文本,以便从其他项目编辑的字段。

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%>" />

或者数据源可用于绑定的项目路径(不推荐)或ID(好一点):

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" />

您还可以填充任何项目数据源在codebehind。

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

作为替代方案,利用了一个框架,如自定义项生成器来创建一个.NET类,将允许你从任何项目,将支持内联编辑的方式轻松输出字段值。

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.

参考文献:

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

http://www.techphoria414.com/Blog?tag=custom+项目+发电机

这篇关于在其他项目Sitecore的行内编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆