sitecore

Why should all Glass.Mapper fields be virtual?

你离开我真会死。 提交于 2019-12-10 16:20:31
问题 The Glass.Mapper documentation states: using Glass.Mapper.Sc.Configuration.Attributes; namespace Glass.Mapper.Sites.Sc.Models.Landing { public class HomePage { public virtual string Title { get; set; } public virtual string MainBody { get; set; } } } You can see that this class doesn't include any special markup however one important thing to remember when writing class with Glass.Mapper is to ensure that all your fields are marked as virtual . Glass.Mapper can automatically infer what data

Force a language prefix in the url with Sitecore

。_饼干妹妹 提交于 2019-12-10 16:07:20
问题 Is there a setting to force the language in the URL? Like, if I browse to http://www.site.com, I should be redirected to http://www.site.com/en, as it is now I can see the start page without the language prefix. The LinkManager is configured to always put in the prefix so all the links look fine at least. 回答1: Another way to use is our SEO Friendly URL Module. This module implements a custom LinkProvider that provides SEO Friendly URL's and forces items to be accessed through their friendly

How do I control the priority of nested queries in Sitecore ContentSearch with the Solr Provider?

倖福魔咒の 提交于 2019-12-10 15:54:49
问题 Version Details: I am working with Sitecore 7.5 build 141003, using Solr v4.7 as the search engine/indexing server. I am also using the standard Sitecore Solr provider with no custom indexers. Target Goal: I am using Sitecore ContentSearch LINQ with PredicateBuilder to compile some flexible and nested queries. Currently, I need to search within a specific "Root item", while excluding templates with "folder" in their name, also excluding items with "/testing" in their path. At some point the

Implementing Sitecore Multisite Robots.txt files

≯℡__Kan透↙ 提交于 2019-12-10 15:41:09
问题 How to implement to have different robots.txt files for each website hosting on the same Sitecore solution. I want to read dinamically robots.txt from sitecore items. 回答1: you need to follow next steps: 1) Create and implement your custom generic (.ashx) handler. 2) In the web.config file add the following line to the section 3) Navigate to the section and add here 4) On home item you will have "Robots" field (memo, or multi line field, not richText field) Your custom generic handler will

Sitecore WFFM CD gives “Could not find configuration node: databases/database[@id='master']”

ぐ巨炮叔叔 提交于 2019-12-10 15:18:15
问题 Sitecore WFFM page in CMS (connected to Master) works. In CD all pages works but when we go a WFFM page we get error Could not find configuration node: databases/database[@id='master'] It looks like WFFM in CD is looking into Master. In the connection string there is no master as it is CD. I think this config is causing issue (Sitecore.Marketing.Definitions.MarketingAssets.Repositories.config). Am I missing any steps in deploying to CD? This error was shown in page(some part of it): Sitecore

Sitecore 8: Automatically fill a placeholder by a default rendering

拜拜、爱过 提交于 2019-12-10 15:01:16
问题 I was playing around with dynamic placeholders and was struck by a prefilling concept.Is there a way to select a default rendering for one of my placeholders which would avoid the "select rendering" dialog in experience editor ?? Scenario: I have a rendeing called "PageHead" which has three renderings. One of them is a placeholder "PageTeaserPh" which currently allows two renderings: one is "PageTeaser" and second "PageTeaserWithImage". I want the placeholder "PageTeaserPh" to always have the

Sitecore presentation details don't update on template change

非 Y 不嫁゛ 提交于 2019-12-10 14:27:24
问题 I'm working on a Sitecore (6.4.0.101124) site that has two templates used for the home page. These have a very similar structure - the big difference between them is that they each have one different sublayout in the Controls section of the Presentation Details of the Standard Values. My understanding is that when the template is changed on an item the standard values of the template should be applied to that item. However, when the content editors change the template the presentation details

How to programmatically populate Sitecore items (Add item and fields)?

孤人 提交于 2019-12-10 14:22:17
问题 I'm now battling with adding items via C# to Sitecore database. The code below executes correctly, however the items aren't being created. Also, I noticed, that the item["FieldName"]=value; syntax doesn't actually populate the Fields collection. And Fields collection on the item seems read only, so I can't just call .Add on it (such method doesn't exist). So - what is the correct way of creating a child item and populating its fields? I am using the Master database for both the Sitecore

Sitecore: adding new tabs to content editor

别说谁变了你拦得住时间么 提交于 2019-12-10 14:16:25
问题 I'm looking for a way to extend sitecore's content editor so I can have another tab show up when I click on an item on my content tree. the purpose is to provide a better user experience when editing some specific information. I have seen this done in some of the addons. An example would be the "E-Commerce" module. 回答1: What you're looking for is a custom editor. Here are several blog posts on the topic: Custom Item Editors in Sitecore Creating a Item Editor Editor Tabs in Sitecore 来源: https:

Sitecore 7 pdf indexing

时光总嘲笑我的痴心妄想 提交于 2019-12-10 13:08:43
问题 I try to index PDF files with Sitecore 7. I installed IFilter , but I received on crawlers log next error : ManagedPoolThread #17 09:24:20 WARN LuceneIndexOperations : Update : Could not build document data 4433434-3443-3223-91c4-233232. Skipping. Exception: System.Runtime.InteropServices.COMException Message: Error HRESULT E_FAIL has been returned from a call to a COM component. Source: mscorlib at System.Runtime.InteropServices.ComTypes.IPersistFile.Load(String pszFileName, Int32 dwMode) at