从Sitecore 7中的图像字段浏览图像时,是否可以默认使用"浏览"选项卡而不是新的"搜索"选项卡?
新的搜索功能非常适合高级用户,但是,我的内容作者发现它令人困惑,特别是在结果中显示多种语言.在某些情况下,选择搜索结果项也会产生错误,因此我只想在此时禁用它.

我有一个Sitecore 7控制器渲染.我需要通过自定义方法改变OutputCache.
渲染当前在Sitecore中设置为"Cachable","VaryByData"和"VaryByParm".
我已经为我的操作添加了输出缓存属性,并设置了自定义变量字符串:
[OutputCache(VaryByCustom = "ThisIsATest", Duration = 60)]
public ActionResult Index()
{
...
}
Run Code Online (Sandbox Code Playgroud)
我的Global.asax继承自Sitecore.Web.Application,我已经重写了GetVaryByCustomString,如下所示:
public override string GetVaryByCustomString(HttpContext context, string custom)
{
if (custom == "ThisIsATest")
return "some custom key";
return base.GetVaryByCustomString(context, custom);
}
Run Code Online (Sandbox Code Playgroud)
我从来没有看到过GetVaryByCustomString方法,并且控制器的行为似乎根本就没有OutputCache属性......就好像它实际上只是做了默认的"Cachable","VaryByData"," VaryByParm"来自Sitecore的行为.
有线索吗?
大家好我在Sitecore中有关于铲斗物品的问题.
我有以下结构:

我想在"测试"详细信息页面上创建一个按钮,返回顶部"新闻概述".
通常我会做类似的事情:
LinkManager.GetItemUrl(Sitecore.Context.Item.Parent)
Run Code Online (Sandbox Code Playgroud)
这里的问题是直接父级是桶"44"而不是"新闻概述".
创建概览桶链接的最佳方法是什么?
提前致谢!
我是Sitecore的新手,并且有一项任务是使用SiteCore 7 API构建搜索.在搜索结果查询执行时收到以下错误.
System.ArgumentNullException: Value cannot be null. Parameter name:
fieldNameTranslator
Run Code Online (Sandbox Code Playgroud)
从以下行引发的错误
IQueryable<SearchResultItem> results = context.GetQueryable<SearchResultItem>();
Run Code Online (Sandbox Code Playgroud)
堆栈说
Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter valueFormatter, IFieldQueryTranslatorMap`1 fieldQueryTranslators, FieldNameTranslator fieldNameTranslator, IExecutionContext[] executionContexts) +284
Run Code Online (Sandbox Code Playgroud)
我已登录到内容管理系统,在索引管理器中我正在尝试重建sitecore_web_index的索引,但是我收到以下错误
Job started: Index_Update_IndexName=sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sitecore.Exceptions.ProviderConfigurationException: Solr operations unavailable. Please check your global.asax,
Run Code Online (Sandbox Code Playgroud) 如果用户正在搜索sitecore存储桶,并且他们对存储桶中的所有项目没有读取权限,则在搜索时会出现问题.
例:
假设存储桶搜索中返回了1000个项目,并且用户只能读取其中的100个项目.最终发生的事情仍然是"你的搜索已经返回1000件物品".更糟糕的是,他们没有读取权限的所有项目仍然显示在列表中但是空白.
这造成了没有返回结果的错觉.实际上,当用户无法访问给定某个页面索引/大小的任何项目时.
有没有人以前遇到过这个问题?我猜测Sitecore正在对项目进行搜索后处理,导致在搜索中找到项目,但不显示.
我的想法:
我正在考虑的一个可能的解决方案是使用正确的Sitecore管道并调整Lucene HitCollector以验证用户安全性.如果我能找到正确的管道,这将解决问题,但我想知道是否有更好的方法?
我更愿意编写更具体的Sitecore存储桶代码.例如添加lucene查询术语的代码(搜索自定义角色字段或类似的东西),然后根据当前用户的角色将其自动添加到搜索中.
我在Sitecore中有两个字段:
我正在使用带有glass mapper的sitecore MVC,我需要从page eidtor中创建两个字段,所以我使用这段代码:
<div class="callout-footer">
<p>
@using (BeginRenderLink(calloutItem, m => m.ReadMoreLink, new NameValueCollection { { "class", "group-action" } }, isEditable: true))
{
<span class="text">@Editable(calloutItem, m => m.ReadMoreTitle) </span>
}
</p>
</div>
Run Code Online (Sandbox Code Playgroud)
现在我可以编辑链接,但标题仍然不可编辑.如何从页面编辑器中使它们都可编辑?
我升级到GlassMapper版本4.0.1.8,我遇到了一些模型属性的奇怪行为.
我的所有模型都是由TDS生成的,大多数都可以正常工作.在一个模型上,Glass Mapper在一个特定属性和基础模型中的所有属性上抛出了一个空引用异常.对于模型的所有属性设置延迟加载为false后,问题消失了......
但是,之后我在所有模型属性上设置了SitecoreFieldSettings.DontLoadLazily,因为它们都是由TDS生成的,但是现在不同模型的另一个属性给了我相同的异常,并且此属性也不是延迟加载的.
这是例外:
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Glass.Mapper
at Glass.Mapper.AbstractService.InstantiateObject(AbstractTypeCreationContext abstractTypeCreationContext)
at Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateConcrete.LazyObjectInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ListitemLinkProxy.get_Link()
at ASP._Page_Views_MyProject_Pages_MyPage_cshtml.Execute() in c:\mycode.cshtml:line 86
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, …Run Code Online (Sandbox Code Playgroud) 在sitecore我想得到继承形式"工业产品模板"的所有孩子和大孩子.
下面是快速查询,但它给出错误错误:预期在第5位的字符串结束.
快速查询:
_masterdb.SelectItems("query:/sitecore/content/Product Catalog/Industrial/Products/*[@@templatename='Industrial Product']")
一般指导似乎是将Sitecore安装到一个文件夹中,例如D:\ Websites\MyWebSite,然后在单独的文件夹中创建Visual Studio项目,例如C:\ Projects\MyWebProject.然后,您可以将自定义代码从Visual Studio发布到Sitecore文件夹中(此视频解释了我在描述https://www.youtube.com/watch?v=i3Mwcphtz4w约13分钟内的内容).
我有以下问题: -
sitecore ×10
sitecore7 ×10
c# ×3
glass-mapper ×2
asp.net-mvc ×1
lucene ×1
outputcache ×1
razor ×1
sitecore-mvc ×1
solr ×1
webdeploy ×1