sitecore6

Sitecore Language Embedding multiple sites

拥有回忆 提交于 2019-12-01 06:47:25
问题 I'm looking to run two sites off one Sitecore install. The first site will only be in UK English therefore I won't include the language in the file path. languageEmbedding=never The second site will be in multiple languages and I need to include the language in the file path. languageEmbedding=always Is there a way I can define multiple link managers and configure the sites to use a specific link manager? 回答1: I've found the best way was to create a custom link manager that supports both

What is the purpose of the VisitorIdentification control?

天涯浪子 提交于 2019-12-01 05:57:11
My Sitecore starterkit website contains the following control in the head of each layout. Can someone explain what it's purpose is and whether or not it's needed? I could not find any information on it on the Sitecore SDN... <sc:VisitorIdentification id="VisitorIdentification" runat="server" /> Control's output: <link href="/layouts/System/VisitorIdentification.aspx" rel="stylesheet" type="text/css" /> Contents of stylesheet: .sc_visitor { } See Analytics Configuration reference , paragraph 4.1.5 "The VisitorIdentification Web control". Just in case the link about becomes obsolete: The

How to check whether Sitecore item is using alias

假如想象 提交于 2019-11-30 21:23:46
Currently an "Alias" in Sitecore will produce multiple routes to the same content item which can negatively affect SEO in some cases. I am looking for a way to programatically check whether the current Page/Item/URL/Request is using an alias or not. I was hoping there would be something along the lines of: Sitecore.Web.WebUtil.IsAlias Any ideas on how to check for aliases? -------UPDATE------- Here is my current solution which appears to work just fine... Unless anyone has a better ideas?: protected bool IsAlias { get { string fullPath = LinkManager.GetItemUrl(Sitecore.Context.Item); return

Sitecore uses “302 found” to redirect users to my custom 404 page - is that legitimate?

不羁的心 提交于 2019-11-30 20:40:55
This is more of a HTTP spec question than a Sitecore question. I have a 404 error page set up in Sitecore: <setting name="ItemNotFoundUrl" value="/404.aspx" /> So, when a user accesses a non-existent page (e.g. www.example.com/xyz) they get redirected to my custom 404 page (e.g. www.example.com/404.aspx). Sitecore performs the redirect using a 302 as seen in the Firebug screenshot below: Is this a problem? i.e. will Google and other search engines index my 404 page at the URL www.example.com/xyz? The site in question was originally set up to return "200 OK" responses from the 404 page (bad!)

TermQuery not returning on a known search term, but WildcardQuery does

大憨熊 提交于 2019-11-30 20:19:01
Am hoping someone with enough insight into the inner workings of Lucene might be able to point me in the right direction =) I'll skip most of the surrounding irellevant code, and cut right to the chase. I have a Lucene index, to which I am adding the following field to the index (variables replaced by their literal values): document.Add( new Field("Typenummer", "E5CEB501A244410EB1FFC4761F79E7B7", Field.Store.YES , Field.Index.UN_TOKENIZED)); Later, when I search my index (using other types of queries), I am able to verify that this field does indeed appear in my index - like when looping

How to programmatically approve a content item in Sitecore

荒凉一梦 提交于 2019-11-30 09:04:03
问题 Is there a way that I can programmatically approve a content item in Sitecore? 回答1: Here's what you might want to do. Setup a checkbox per site that will allow admins to chose whether they want to use Awaiting Approval or not. An admin will simply check a checkbox to Skip Approval (Draft to Approved) or leave unchecked to maintain workflow (Draft>AA(Approve or reject)>Approved): In your workflow, under draft state verify that you have a submit command with next state assigned to Awaiting

How to check whether Sitecore item is using alias

萝らか妹 提交于 2019-11-30 05:42:40
问题 Currently an "Alias" in Sitecore will produce multiple routes to the same content item which can negatively affect SEO in some cases. I am looking for a way to programatically check whether the current Page/Item/URL/Request is using an alias or not. I was hoping there would be something along the lines of: Sitecore.Web.WebUtil.IsAlias Any ideas on how to check for aliases? -------UPDATE------- Here is my current solution which appears to work just fine... Unless anyone has a better ideas?:

TermQuery not returning on a known search term, but WildcardQuery does

南楼画角 提交于 2019-11-30 04:53:37
问题 Am hoping someone with enough insight into the inner workings of Lucene might be able to point me in the right direction =) I'll skip most of the surrounding irellevant code, and cut right to the chase. I have a Lucene index, to which I am adding the following field to the index (variables replaced by their literal values): document.Add( new Field("Typenummer", "E5CEB501A244410EB1FFC4761F79E7B7", Field.Store.YES , Field.Index.UN_TOKENIZED)); Later, when I search my index (using other types of

Sitecore 'dynamic placeholders' with MVC

前提是你 提交于 2019-11-29 20:28:20
I'm looking for a working Dynamic Placeholder solution in MVC. There are at least two good descriptions of this "pattern" for use with WebForms: http://trueclarity.wordpress.com/2012/06/19/dynamic-placeholder-keys-in-sitecore/ http://www.techphoria414.com/Blog/2011/August/Dynamic_Placeholder_Keys_Prototype And I also found this blog explaining how to do it with MVC: http://blogs.perficient.com/portals/2012/10/17/sitecore-mvc-dynamic-placeholders/ First I have tried to implement Techphoria's method (with GUIDs) using techniques from the MVC blogpost (extension of the SitecoreHelper) and I also

How to sort/filter using the new Sitecore.Search API

独自空忆成欢 提交于 2019-11-29 15:20:08
问题 I couldn't find any way to do sort and filter using the new Sitecore.Search API. Lucene provides the following methods: Search(Query query, Filter filter) Search(Query query, Sort sort) Search(Query query, Filter filter, Sort sort) But I don't think Sitecore.Search API exposes these features. Am I missing something? Can someone please explain how to perform Filter and Sort with the new Sitecore.Search API? Or do I need to use the wrapped Searcher.Search(Query, Sort) to achieve this? I am