sitecore

What's a good way to set the Item or DataSource attribute of a FieldRenderer?

前提是你 提交于 2019-12-03 17:02:08
The scenario is that I have a lot of FieldRenderers. These should output data from various places, some from item X and others from item Y. And should be outputting properties from item Z. Assuming I have a public property ItemX that I want to output a property from, any of the following would be OK. But I get no output by any of them: <sc:FieldRenderer runat="server" FieldName="Logo" DataSource="<%# ItemX %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" DataSource="<%= ItemX.Paths.FullPath %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" Item="<%# ItemX %>" /> <sc

When to definitely use SOLR over Lucene in a Sitecore 7 build?

大憨熊 提交于 2019-12-03 16:12:47
问题 My client does not have the budget to setup and maintain a SOLR server to use in their production environment. If I understand the Sitecore 7 Content Search API correctly, it is not a big deal to configure things to use Lucene instead. For the most part the configuration will be similar and the code will be the same, and a SOLR server can be swapped in later. The site build has faceted search page listing components on landing and on other pages that will leverage the Content Search API

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'X'

本小妞迷上赌 提交于 2019-12-03 15:57:06
I am building a solution with Sitecore 7 and ASP.NET-MVC 3 and trying to use a custom model class as described in this blog post by john west . I have seen several other questions here on SO reporting a similar error with ASP.NET-MVC (without Sitecore), usually related to passing the wrong type of object in controller code, or there being a configuration error with the \Views\web.config file, but neither seem to be the issue here. this issue is caused when you create a view rendering (possibly others but i haven't tried it) and you have not set up the model in sitecore, so sitecore is passing

Unit Testing Sitecore using NUnit, serializing content

亡梦爱人 提交于 2019-12-03 15:39:44
In my business, I am working on Unit Testing, after finishing an example in a .NET application. We want to use a standard .NET Unit Testing project. We also want to mock the Sitecore data by serializing the Sitecore objects. I have been looking for, but could not find a good tutorial to do this. How can I do this? Interesting videos on Youtube Sitecore Unit Testing video by gravypower. Another interesting video by codeflood. Most knowledgeable for me was this video by Alistair Deneys from Hedgehog Other interesting blogs are Igloo - Unit Testing for Sitecore iStern - Unit testing with Sitecore

How to disable Sitecore Analytics entirely

穿精又带淫゛_ 提交于 2019-12-03 15:04:41
We are experiencing cpu problems on our production servers. After profiling with the jetbrains cpu profiler, we have noticed that some functions in the assembly Sitecore.Analytics were executed. This is somewhat strange because we have disabled all analytics related configuration in de config files. After looking into the /sitecore/admin/showconfig.aspx we noticed that there are still a lot of Sitecore.Analytics related configurations in this config while these are deactivated in our config files. For example In the file /App_Config/Include/EventHandlers.config the configuration looks like

Strange Timeout in Sitecore 7

北战南征 提交于 2019-12-03 15:04:17
I've been using Sitecore version 7.1 for a few months now and have noticed that the Sitecore client logs me out after being idle for around 20 mins. Also other users have reported these issues whilst content editing. I'm using Windows 7, IIS 7, .NET framework 4.5. I've checked the error log for anything and can see no obvious errors and the keepalive service is running - I get this information in the logs: ManagedPoolThread #14 12:47:24 INFO Scheduling.UrlAgent started. Url:http://testsite/sitecore/service/keepalive.aspx I get some of these in the log, but could this be related? WARN Memory

Create link to Sitecore Item

感情迁移 提交于 2019-12-03 14:58:53
问题 I know I have done this before but I can't seem to remember where or how. I want to create a link to an Item in Sitecore. This code: Sitecore.Data.Items.Item itm = Sitecore.Context.Database.GetItem(someID); return itm.Paths.Path.ToString(); Produces the following string: http://localhost/sitecore/content/Home/Item1/Item11/thisItem I would like to have this string instead: http://localhost/Item1/Item11/thisItem.aspx What is the correct way to get the path to the item? In this case I can't use

What is the difference between Sitecore's core, master, and web databases?

江枫思渺然 提交于 2019-12-03 14:56:58
问题 What is the difference between Sitecore's core, master, and web databases? 回答1: I recommend you look at the Launch Sitecore site to understand more about the CMS. From the page on Sitecore Architecture: Master The Master database is the authoring database - it contains all versions of any content or assets. Core The Core database is all Sitecore settings, as well as the tables containing the .Net membership provider (i.e. users/roles contained in the Sitecore repository) Web The Web database

Setting __Renderings field not shared in Sitecore consequences?

安稳与你 提交于 2019-12-03 14:53:01
Does anyone have experience in setting the __Renderings field in Sitecore to not be shared? We are building a multi site-multi language solution and would need the (sub)layouts to be different in different languages. For example, the English language site could have a sublayout that the Swedish version of the same item does not have and all presentation components does not always have the same data source for different languages. A somewhat easy solution to this would be to simply uncheck "shared" on __Renderings field in the /sitecore/templates/System/Templates/Sections/Layout template , but

Sitecore 6.5 with MVC3

给你一囗甜甜゛ 提交于 2019-12-03 14:52:01
I have to use Sitecore 6.5 with MVC framework and as per the reference document I can setup Sitecore and make that running. I have created MVC3 .NET web application project (blank and using Razor) and I dot know following things How do I setup Layouts and Sublayouts? (this must be different then web form I guess) What do I have to do to use Sitecore data controls e.g. FieldRenderer, Text etc. (I guess without those controls it will be not easy for us to use provide Page Editing mode) How do I use Sitecore placeholders in MVC? I have used this document as a reference. At present Sitecore MVC