zoukankan      html  css  js  c++  java
  • Sitecore系统教程即时查阅编辑内容

    实时模式中的Sitecore

    作为开发人员,我们经常需要在本地环境中使用代码和内容。在本地,能够立即看到任何内容更改,以节省时间和提高效率是有意义的。这是在实时模式下运行Sitecore。默认情况下,您在master数据库中工作,并将更改发布到Web数据库。
    这意味着您使用内容,并在准备好后,发布到Web数据库,即内容交付数据库,在实时模式下运行Sitecore,可以通过将本地网站指向主数据库来完成。

    如何

    首先你必须要知道,从Sitecore 8.1及更高版本,sitecore配置是从web.config中提取的,而如果你在8.0及更低版本上工作,那么sitecore部分就在web.config中。所以在哪里有区别需要改变。
    在自定义解决方案中,您可能希望使用自定义解决方案定义创建补丁文件,如果您运行Sitecore 8.0或更低版本,则可以在此处进行更改。对于概念证明,您可以直接在web.config文件中进行,但绝对不是最佳实践。从8.1及更高版本开始,您可以直接在Sitecore.config文件中进行更改,因为它已经从web.config中提取,因此我们有一个包含Sitecore配置的单独配置文件。

    找到此节点(在Sitecore.config或web.config中):

    <site name =“website”enableTracking =“true”virtualFolder =“/”physicalFolder =“/”rootPath =“/ sitecore / content”startItem =“/ home”database =“web”domain =“extranet”allowDebug =“true “cacheHtml =”true“htmlCacheSize =”50MB“registryCacheSize =”0“viewStateCacheSize =”0“xslCacheSize =”25MB“filteredItemsCacheSize =”10MB“enablePreview =”true“enableWebEdit =”true“enableDebugger =”true“disableClientData =”false “cacheRenderingParameters =”true“renderingParametersCacheSize =”10MB“/>

    并将database = web的值更改为database = master:

    <site name =“website”enableTracking =“true”virtualFolder =“/”physicalFolder =“/”rootPath =“/ sitecore / content”startItem =“/ home”database =“master”domain =“extranet”allowDebug =“true “cacheHtml =”true“htmlCacheSize =”50MB“registryCacheSize =”0“viewStateCacheSize =”0“xslCacheSize =”25MB“filteredItemsCacheSize =”10MB“enablePreview =”true“enableWebEdit =”true“enableDebugger =”true“disableClientData =”false “cacheRenderingParameters =”true“renderingParametersCacheSize =”10MB“/>

    现在,内容将从Master数据库加载。
    更改一些内容并保存更改。重新加载您的网站。
    对任何配置文件或二进制文件夹的更改会触发应用程序池重置,因此页面重新加载将花费时间。
    BAM - 您将看到更改生效,现在不需要发布。

    直接从Master数据库访问内容

    强制从特定数据库中提取内容的另一种方法是使用sc_database参数。因此,例如,您可以将sc_database = master作为参数添加到url,以强制从master数据库中提取内容。您必须以具有读取权限的用户身份登录才能执行此操作。

  • 相关阅读:
    HearthBuddy投降插件2019-11-01的使用
    正则表达式在线分析 regex online analyzer
    Tips to write better Conditionals in JavaScript
    The fileSyncDll.ps1 is not digitally signed. You cannot run this script on the current system.
    Cannot capture jmeter traffic in fiddler
    JMETER + POST + anti-forgery token
    input type color
    HearthBuddy修改系统时间
    What are all the possible values for HTTP “Content-Type” header?
    UDK性能优化
  • 原文地址:https://www.cnblogs.com/BlogNetSpace/p/10315742.html
Copyright © 2011-2022 走看看