Sitecore 如何管理重复内容
我目前正在 Sitecore 中开发一个网站,其中将有三个不同的区域,它们具有相同的结构,直至第 2 级页面,超出此级别结构可能会有所不同。其中一些页面的每个结构都具有相同的内容,而有些页面则是唯一的。内容是这样的:
home\section-1-home\sub-page-1 (identical content between the three sections)
\sub-page-2 (identical content between the three sections)
\sub-page-3 (different content for each section)
\section-2-home\sub-page-1
\sub-page-2
\sub-page-3
\section-3-home\sub-page-1
\sub-page-2
\sub-page-3
\sub-page-4 (extra page, unique to this section)
Is there a way to Manage this scene in Sitecore?
到目前为止,我有两个如何管理此问题的想法:
1)设置某种自定义发布操作,将页面的指定“主”版本的内容合并到同一页面的从属版本。
2) 创建一个主内容树(与 home 处于同一级别,因此不能直接浏览),然后对 Sitecore Context 对象进行一些巧妙的操作,使其指向该主内容树中的某个项目而不是当前项目。
编辑: 只是为了澄清;我在此网站上使用的是 Sitecore 6.2,目前无法更改为 Sitecore 的其他版本:-(
I'm currently developing a website in Sitecore where there will be three distinct areas which have the same structure down to level 2 pages, beyond this level structure is likely to diverge. Some of these pages will have identical content across each structure, whereas some will be unique. The content is something like this:
home\section-1-home\sub-page-1 (identical content between the three sections)
\sub-page-2 (identical content between the three sections)
\sub-page-3 (different content for each section)
\section-2-home\sub-page-1
\sub-page-2
\sub-page-3
\section-3-home\sub-page-1
\sub-page-2
\sub-page-3
\sub-page-4 (extra page, unique to this section)
Is there a way to manage this scenario in Sitecore?
I've had two ideas how to manage this so far:
1) Set up some kind of custom publishing action which merges content from a nominated 'master' version of a page, to the slave versions of the same page.
2) Create a master content tree (at the same level as home and thus not directly browsable), then do something clever to the Sitecore Context object to make it point to an item in this master content tree instead of the current item.
Edit:
Just to clarify; I'm using Sitecore 6.2 for this site and at the moment, changing to another version of Sitecore isn't an option :-(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您使用的是 Sitecore 6.4,那么您可能需要查看项目克隆。您可以克隆内容树的单个项目甚至整个分支。克隆将从其父级获取数据,但项目的各个字段可能会被覆盖。
针对多个站点、多个站点的 Sitecore 6.4 架构的注意事项语言开放式解决方案?
http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/10/Sitecore-CMS-6-4 -Cloning.aspx
如果您继续使用早期版本,那么您应该阅读以下内容:
http://sdn.sitecore.net/upload/sitecore6/sc62keywords/reusing_and_sharing_data_sc62_a4001。 pdf
他们有时会更新该文档以包括克隆...
If you're working with Sitecore 6.4 then you may want to look at item cloning. You can clone a single item or even an entire branch of the content tree. A clone will get its data from its parent, though individual fields of the item can be overwritten.
Considerations for Sitecore 6.4 architecture for multiple site, multiple language open ended solution?
http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/10/Sitecore-CMS-6-4-Cloning.aspx
If you're staying with an earlier version then you should read this:
http://sdn.sitecore.net/upload/sitecore6/sc62keywords/reusing_and_sharing_data_sc62_a4001.pdf
They'll update that document to include cloning sometime...
如果我正确理解你的问题,那么你可以通过多种方式来做到这一点,我只会提到几个
在你的树中创建一个自定义的“共享内容”部分,然后在每个部分中创建一个“共享内容子布局/”渲染器”并将子布局的源设置为共享内容
其他选项可能是将 on 部分视为主部分,然后挂钩到保存或发布管道并创建/克隆您的项目。
If I understood your problem correctly, then there are various ways you can do this, i will only mention a couple
Create a custom 'shared content' section in your tree and then with in each section create a 'shared content sublayout/renderer' and set the source of the sublyout to the shared content
Other option could be to consider on section as the master section and then hook into either save or publishing piplines and create/clone your items.
您可能会发现此线程很有用:
检索内容树中的 Sitecore 项目位置 A 以及位置 B 的用户
You might find this thread useful:
Retrieving Sitecore items Position A in the content tree and to the user in Position B
您还可以使用代理,它可以与许多版本的 Sitecore(5.3 到至少 6)一起使用,让您创建项目的“副本”。
不过,您需要在 web.config 中启用它们,但也有一些缺点。
对于 Sitecore 6,请参阅:
http://sdn .sitecore.net/upload/sitecore6/64/reusing_and_sharing_data-a4.pdf#search=%22proxies%22
或者在 SDN 上搜索代理。
You could also you proxies, which work with a lot of version of Sitecore (5.3 to at least 6), which let you create "copies" of items.
You need to enable them in the web.config though and there are some draw backs.
For Sitecore 6 see:
http://sdn.sitecore.net/upload/sitecore6/64/reusing_and_sharing_data-a4.pdf#search=%22proxies%22
Or do a search on proxies on the SDN.