sitecore6

How to determine in sitecore whether given item is start item?

邮差的信 提交于 2019-12-24 05:05:39
问题 In config file we set start item for each website in element (e.g. startItem="/Home"). And we also can select start item in code. But what I am asking about is how to determine for any selected item whether it is start item or not? At least we can select start item and compare with given item, but it is not elegant code I think 回答1: We typically have an extension method on the SiteContext class to get the Home Item: public static class SiteExtensions { public static Item GetHomeItem(this

Sitecore + Lucene + QueryOccurance.Should not returning desired results

北慕城南 提交于 2019-12-24 03:31:30
问题 I Am using Alex Shybas Advanced DatabaseCrawler and it is working beautifully... almost... I Am using for a carsales application in which you can search for a car using the following values Model Make Fuel Mileage Price Year (Registration date) I have multiple NumericRange queryies: -1000 - 0 (this is for those dealers, that do not want the price online. They write the price as -1) bottom to top ie. (10000 - 20000) This is what i want to sort by The are both in the same

Varying content and presentation by host name in Sitecore 6.4

喜你入骨 提交于 2019-12-24 02:09:56
问题 Scenario: A section of the content tree is the home item for a site that runs under two host names (www.site1.com and www.site2.com The purpose of the two host names is to differentiate between two target countries that are served with the same content, and the same organisation (marketing department, web editor etc.) The content is, of course, identical across the two host names. Except.... In a couple of places we need some small differences. A contact email, for instance, or a legal notice

Sitecore - Webforms For Marketers Form - Use ReadQueryString Option

萝らか妹 提交于 2019-12-24 02:01:52
问题 When one has added a WFFM form to a Sitecore Item, you can go to the Presentation Details and click on Form. There you'll see an option called ReadQueryString - Reads initial values from the url query string. My form has a few fields, one of which being Email . I tried adding ?Email=test to the URL of the page that hosts this form, but the value is not being picked up. Am I correctly understanding the intended purpose of this option? Am I using it correctly? Sitecore version 6.5; Web Forms

How to do a Lucene search with Sitecore item with specific date?

纵然是瞬间 提交于 2019-12-24 01:45:10
问题 I've a Content item is Sitecore with the date field named 'EventDate'. I want to search those items with specific date using Lucene.Net. Below is the code I've tried but i am not getting the result: var index = SearchManager.GetIndex("event_search_index"); var items = new List<EventDetailItem>(); var eventDateString = eventDate.Year.ToString("D4") + eventDate.Month.ToString("D2") + eventDate.Date.Day.ToString("D2"); using (var context = new IndexSearchContext(index)) { var searchTerm = new

Exporting user permissions?

半腔热情 提交于 2019-12-23 15:41:24
问题 Does anyone know of any way to export user and role permissions, and then re-import them on another copy of Sitecore? I've had a search around, and bar writing a bit of code to do this, doesn't appear to be anything immediately available ... 回答1: The permissions are actually stored on the items themselves , not the Role or User objects. There are two ways to export the object like Stephen mentioned, perform the export/import on the item you granted/revoked access to, not the role or user. 回答2

Sortorder of Inherited Templates

一曲冷凌霜 提交于 2019-12-23 09:58:22
问题 Using Sitecore 6.6 we are constructing some templates that inherit many base templates. This is great for reuse and standardizing our code, as all the fields are stored in a constants file for easy reference. However, we seem to be unable to define the order that these inherited templates are displayed. The templates seem to be sticking to the original order they were added in no matter what. We've tried using the sortorder on the actual base templates themselves, but that doesnt appear to

How do I rebuild a custom Lucene index on a Sitecore content delivery server?

跟風遠走 提交于 2019-12-23 09:32:34
问题 The custom Lucene index on my Sitecore 6.2 Content Delivery server seems to be not right. So I think I need to rebuild all 3 of my custom indexes. How do I do that? Do I just have to use the shared source Index Viewer module? Right now I have that installed on my CD server, however for some reason it is not working. When I select my custom index in Index Viewer - nothing happens. So I can't rebuild the index that way. Can I just delete the index files from the hard drive? If so, how quickly

Setting a deadlock victim

给你一囗甜甜゛ 提交于 2019-12-23 03:33:48
问题 We're using siteCore 6.5 and each time we start to publish items, users who are browsing the website will get server 500 errors which end up being Transaction (Process ID ##) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. How can we setup SQL Server to give priority to a specific application? We cannnot modify any queries or code so it has to be done via SQL Server (or connection string) I've seen "deadlock victim" in

Sitecore display name url does not work without language code

五迷三道 提交于 2019-12-23 01:52:42
问题 On this Sitecore website (6.5.0 rev. 120706), I have this sitecore item called XYZ. So I have http://example.com/XYZ/. I've added french localization, so using display names I now have: http://example.com/XYZ-en/ http://example.com/XYZ-fr/ The english version works well, but the french does not and resolves to 404 unless I go to the english first, click on my language switcher button first. When I click on it, I'm redirected to http://example.com/fr-CA/XYZ-fr/, which works. From then on, the