sitecore

How to use Droplist types in Sitecore template fields

孤街醉人 提交于 2019-11-30 22:21:47
Is there anyone who knows how to use "Droplist" type in template fields? I guess "Droplist" is the same as <select><option></option></select> type. I'd like to specify select list types with static values so that Sitecore editors can select only one of many available lists when they create a page. My plan is to add CSS class names ( <option> ) in the list ( <select> ) and editors will use one of styles by selecting one of them. How to add the values in select list? Do I have to write code? Trayek The Droplist is similar to the Droplink field type in that they are both dropdowns. The Droplist

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!)

How to build a sitemap using Sitecore

时光毁灭记忆、已成空白 提交于 2019-11-30 20:36:20
I need to create a Sitemap for a Sitecore website. How can I do this? If you're after a sitemap page to list the pages on your site you should try the Shared Source module 'Sitemap'. http://marketplace.sitecore.net/en/Modules/Sitemap.aspx However, if you're after a sitemap for search engine optimization, use Sitemap XML. http://marketplace.sitecore.net/en/Modules/Sitemap_XML.aspx It depends on what you need as a Sitemap. Do you want an XML sitemap that goes to Google? Or do you want a sitemap that shows the structure of your website? I'd suggest looking at the Sitecore marketplace ( http:/

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 use Droplist types in Sitecore template fields

♀尐吖头ヾ 提交于 2019-11-30 17:48:42
问题 Is there anyone who knows how to use "Droplist" type in template fields? I guess "Droplist" is the same as <select><option></option></select> type. I'd like to specify select list types with static values so that Sitecore editors can select only one of many available lists when they create a page. My plan is to add CSS class names ( <option> ) in the list ( <select> ) and editors will use one of styles by selecting one of them. How to add the values in select list? Do I have to write code?

Sitecore 7.5 MVC and HttpContext.Session.Timeout set to 1 min

夙愿已清 提交于 2019-11-30 15:49:01
问题 I have the session timeout set to 20min but when I try to access this value from action I'm getting 1min instead. Web.Config settings are: <sessionState mode="InProc" cookieless="false" timeout="20"> <authentication mode="None"> <forms name=".ASPXAUTH" cookieless="UseCookies" timeout="20" /> </authentication> In Global.asax.cs in Session_Start value of timeout is 20min : HttpContext.Current.Session.Timeout But in action in my controller is set to 1min : System.Web.HttpContext.Current.Session

Sitecore 7.5 MVC and HttpContext.Session.Timeout set to 1 min

梦想的初衷 提交于 2019-11-30 14:49:37
I have the session timeout set to 20min but when I try to access this value from action I'm getting 1min instead. Web.Config settings are: <sessionState mode="InProc" cookieless="false" timeout="20"> <authentication mode="None"> <forms name=".ASPXAUTH" cookieless="UseCookies" timeout="20" /> </authentication> In Global.asax.cs in Session_Start value of timeout is 20min : HttpContext.Current.Session.Timeout But in action in my controller is set to 1min : System.Web.HttpContext.Current.Session.Timeout HttpContext.Session.Timeout I've found that when I remove SitecoreHttpModule which is of type (

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

Sitecore Rich Text Html Editor Profile - set global default

亡梦爱人 提交于 2019-11-30 08:23:54
OK I can't believe this can't be found anywhere so I'm asking the question. Is there a way to set the default Html Editor Profile in Sitecore so I don't have the override the Source field on each individual Rich Text field? e.g. I want to make this the default option for the Html editor: /sitecore/system/Settings/Html Editor Profiles/Rich Text Medium MattyC Its an old question but here is the solution I found in Sitecore 6.5 - I was looking to do the same thing in 6.5: You can change the value to the path of your default editor in the web.config. This will change is across all fields where the