sitecore

代码新建item

╄→гoц情女王★ 提交于 2019-11-27 07:35:17
废话不多讲,直接上代码:        using ( new SecurityDisabler()) { Database masterDb = Sitecore.Configuration.Factory.GetDatabase( " master " ); Item parentItem = masterDb.Items[ " /sitecore/content/my-website/home " ]; TemplateItem myTemplate = masterDb.GetTemplate( new ID( " {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} " )); parentItem.Add( " my test item " , myTemplate); } 注:对于在bucket里面新建item, 上面代码同样有效~ Sitecore 会自动建bucket folder。 转载于:https://www.cnblogs.com/JoeHou/p/9100232.html 来源: https://blog.csdn.net/weixin_30737363/article/details/99554618

Sitecore兼容性表

我的未来我决定 提交于 2019-11-27 07:35:15
Sitecore使用第三方软件工具,比如MongoDB和Solr。不同版本的Sitecore对应不同版本的第三方工具。 Sitecore兼容性表: https://kb.sitecore.net/articles/087164 Solr兼容性表 : https://kb.sitecore.net/articles/227897 MongoDB兼容性表: https://kb.sitecore.net/articles/633863 总表参见: https://kb.sitecore.net/articles/311053 转载于:https://www.cnblogs.com/JoeHou/p/9121216.html 来源: https://blog.csdn.net/weixin_30925411/article/details/99554624

Sitecore Analytics - 为啥最后一页duration总是0

删除回忆录丶 提交于 2019-11-27 07:32:24
从打开一个Sitecore网站的第一个页面(可能是首页,也可能是任何一个页面)开始,Sitecore会在session中创建一个“Interaction”的对象,在session end时,这个对象信息会被写入到xDB中,对应"Interactions"中的一条 这条信息记录了用户此次与网站交互的各种信息: 开始时间 结束时间(最后一个页面的打开时间,这也是为啥最后一个页面duration是0的另外一个表现) 存储时间(写入xDB的时间,通常就是session结束的时间) 用户ID 浏览器/操作系统/语言/地点/显示屏等等从client端得到的信息 浏览了哪些页面(存入了一个数组Pages,按浏览开始的时间顺序) 在上面的Pages这个数组中,每一个对象存储了用户浏览这个页面的信息: 开始时间 duration(在这个页面上呆了多长时间,以毫秒为单位) Url 其他信息等等 奇怪的是最后一个页面的duration总是0(到目前看是这样) 感觉Sitecore是从后端计算的duration,大体思路是当一个页面开始,用这个页面开始时间减去上一个页面的开始时间,就得到了上一个页面的duration。 而最后一个页面没有下一个页面,所以也无法计算了。 这样做有一定道理,比如打开最后一个页面后,没有任何操作(比如吃午饭去了等等),等session结束(通常20分钟)

译:Content Editor - 内容编辑器

梦想与她 提交于 2019-11-27 07:32:22
这篇随笔是按照自己的理解翻译的Sitecore官方文章:https://doc.sitecore.net/sitecore_experience_platform/content_authoring/getting_started_with_content_authoring/tools/the_content_editor 非原创!!!非原创!!!非原创!!! 侵删!!!侵删!!!侵删!!! 内容管理器 内容编辑器(Content Editor)是Sitecore自带的用来管理和编辑网站内容的工具。对于比较熟悉Sitecore或者已经有经验的内容管理者来说,这个工具可以更有效快速的编辑网站内容。 对于不同角色和权限的用户,内容编辑器的界面会有不同。比如普通用户可以看到一个图片,但是只有高级用户可以进行编辑/删除等操作。 用户界面 内容管理器主要由三部分组成: 操作按钮区(Ribbon) - 分门别类所有能够有权限进行操作的按钮 内容树区(Content Tree) - 所有内容节点组织成一个树状结构 内容编辑区(Content Area) - 选择某个内容节点后,可以在这个区域进行编辑 操作按钮区(Ribbon) 操作按钮区由系统菜单和功能标签组成。 系统菜单包含察看内容节点、Sitecore选择项、许可证信息等。 各个功能按钮分门别类在不同的标签上。根据不同的权限

安装Sitecore 9 - Solr

旧街凉风 提交于 2019-11-27 07:32:19
前提 Solr是Sitecore 9的默认搜索引擎 需要SSL支持,不能使用http参考:http://sitecore.skowronski.it/sitecore/sitecore-9-set-up-solr-ssl-step-by-step/ 步骤 第一步:下载安装 Solr 6.2.2(为啥是这个版本,参见:https://www.cnblogs.com/JoeHou/p/9121216.html) 下载:http://ftp.ps.pl/pub/apache/lucene/solr/6.6.2/ 解压缩到 “C:\solr\solr-6.6.2” 第二步:注册Solr为Windows服务 下载:https://nssm.cc/release/nssm-2.24.zip 解压缩到:“C:\solr\nssm-2.24” 在“C:\solr\nssm-2.24\win64”目录下打开Powershell,执行:“.\nssm.exe install SolrService”,填入以下参数: 打开Windows服务可以看到一个名称为"SolrService”的服务,点击“开始Start”运行 在浏览器中输入http://localhost:8080/solr/可以看到Solr的界面 第三步:生成SSL证书并导入信任列表 下载安装JRE(Java SE Runtime

How can I configure Sitecore so that it generates absolute links to media items?

不打扰是莪最后的温柔 提交于 2019-11-27 06:12:57
问题 <sc:Image> and <sc:FieldRenderer> , when rendering a MediaItem, generate html code that looks like the following: <img src="~/media/twitter.gif" alt="Twitter" width="100" height="22" /> Notice the relative path used in src attribute: this means that when such an image is reused on multiple pages, the browser has to fetch it multiple times (e.g. on page http://example.com/ and http://example.com/about-us/). When I generate the img tag in code, I can use the following snippet to force an

Sitecore and ASP.net MVC

最后都变了- 提交于 2019-11-27 00:06:46
问题 We are starting off a new project with sitecore as our CMS. I was thinking of using Sitecore as the Content Authoring Tool and use ASP.net MVC as in the Content delivery(CDA) Side along with Sitecore. Would love to hear your ideas and thoughts on this. Have anybody tried this? Is sitecore and MVC competing or Complementing technologies? Any architectural ideas are welcome. 回答1: For certain cases, there can be huge benefit to merging the two. MVC isn't that great of a fit for content-driven

Indexing Sitecore Item security and restricting returned search results

≡放荡痞女 提交于 2019-11-26 22:59:50
问题 I have several roles defined, each with different restrictions to content and media items and I would like to restrict the search results that are returned based on the access rights of the currently logged in user, rather than displaying the result and the user then presented with an "Access Denied" page. Some content will obviously be accessible to extranet\anonymous so they should be returned for all users regardless. The security follows the standard Sitecore practices so Role inheritance

Query notation for the sitecore 'source' field in template builder

社会主义新天地 提交于 2019-11-26 19:15:46
问题 I am trying to set the the source field of a template using the query notation (or xpath - whichever works), but none of them seems to be working. My content tree is a multisite content tree: France --Page 1 ----Page1A -------Page1AA --Page 2 --Page 3 --METADATA ----Regions US --Page 1 ----Page1A -------Page1AA --Page 2 --Page 3 --METADATA ----Regions Each site has its own METADATA folder, and I want it so that when adding a page inside each of the main country nodes, I want the values to

GeneralLink in Sitecore

耗尽温柔 提交于 2019-11-26 16:45:10
问题 I'm new to Sitecore.. I have created a Page template and add a field for a URL of type General Link. I have created another field for the text for the link (this is standard practice in this project). I simply want to display the link in my user control but I just cant get it to work. This should be simple but Im going round in circles Here's an example of the code I've tried .. ascx : <asp:HyperLink runat="server" ID="lnkMain"></asp:HyperLink> ascx.cs: lnkMain.NavigateUrl = SiteCore.Context