sitecore

Launch Content Editor from code

早过忘川 提交于 2020-01-24 13:42:47
问题 I have an application that is creating an new item in Sitecore then opening up the Content Editor to that item, it is loading fine but whenever i try to open the html editor i get a 'NullReferenceException'. This is only happening when i launch the application in this method. Source Code: [Serializable] public class PushToCMS : Command { public override void Execute(CommandContext context) { //Context.ClientPage.Start(this, "Action_PushToCMS"); Database dbCore = Sitecore.Configuration.Factory

Sitecore Multiple RTE Class Styles

送分小仙女□ 提交于 2020-01-24 10:47:24
问题 I can add CSS style path for RichTextEditor(RTE) like below and I can select defined style in RTE. <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="WebStylesheet"> <patch:attribute name="value">/resources/customCSS.css</patch:attribute> </setting> </settings> </sitecore> </configuration> But, there should be two or more types of CSS. For example, the users in Role-A will be able to see only "Role-A.css" in RTE Class list and the users in

How to perform search for multiple terms in Sitecore 7 ContentSearch API?

时光总嘲笑我的痴心妄想 提交于 2020-01-22 12:32:05
问题 I am exploring the new Sitecore.ContentSearch "LINQ to Sitecore" API in Sitecore 7. It is my understanding that Sitecore recommends using the new LINQ API over the existing Sitecore.Search API, however, I am struggling to perform even the simplest of queries. Take for instance the following search query: "hello world" . Using the Sitecore.Search API, the terms "hello world" would typically be passed through a QueryParser which would result in documents matching the word "hello" OR "world".

How to perform search for multiple terms in Sitecore 7 ContentSearch API?

我与影子孤独终老i 提交于 2020-01-22 12:31:26
问题 I am exploring the new Sitecore.ContentSearch "LINQ to Sitecore" API in Sitecore 7. It is my understanding that Sitecore recommends using the new LINQ API over the existing Sitecore.Search API, however, I am struggling to perform even the simplest of queries. Take for instance the following search query: "hello world" . Using the Sitecore.Search API, the terms "hello world" would typically be passed through a QueryParser which would result in documents matching the word "hello" OR "world".

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

房东的猫 提交于 2020-01-21 04:41:08
问题 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

How to get a reference to the currently edited item when inside a custom field in Sitecore

感情迁移 提交于 2020-01-17 03:21:31
问题 In Sitecore I have created a custom field (via this recipe: http://sdn.sitecore.net/Articles/API/Creating%20a%20Composite%20Custom%20Field/Adding%20a%20Custom%20Field%20to%20Sitecore%20Client.aspx) The field is for use in the content editor. The custom field has a menuitem attached (the little textbutton rendered just above the field) The custom field work as expected and the menuitem hooks into code in the custom field class as it should. However, the logic I need to implement for the

Sitecore Media Items and URLs

浪尽此生 提交于 2020-01-17 02:50:08
问题 We are in the process of migrating media items (images, PDFs, etc) from an old system into Sitecore. Some of the directories in the old system have multiple media items with the same name but different extensions. So if I had to get them via URL they would be as follows - http://example.com/images/test.gif http://example.com/images/test.jpg They can obviously be reached in the old file based system because their file extensions differ. In Sitecore, out of the box, this is not the case.

How to include html inside anchor tag in Sitecore

孤人 提交于 2020-01-16 04:35:50
问题 I have a situation where there is HTML inside an anchor tag. And the author should be able to edit both the anchor (href) & other fields. aspx: <asp:Repeater ID="rpEvents" runat="server" ItemType="Sitecore.Data.Items.Item"> <HeaderTemplate> <div class="col-md-3"> </HeaderTemplate> <ItemTemplate> <a href="offers/spring.html"> <sc:Image runat="server" Field="offer image" Item=<%#Container.DataItem%> /> <h3><sc:Text runat="server" Field="Offer Title" Item=<%#Container.DataItem%> /></h3> </a> <

Preview site for Sitecore editors

走远了吗. 提交于 2020-01-15 19:15:05
问题 Our content editors would like to have a preview site that would point to the master database. The site can be used to preview how the web page would look on the live site. The users aren't really comfortable using the 'Preview' option inside Sitecore. This site would point to the CMS server and be separate from the CMS site (used for content editing). The reason we can't use the CMS site to preview data is that HTML caching comes into play and content is not updated right away when a page is

Preview site for Sitecore editors

我们两清 提交于 2020-01-15 19:12:02
问题 Our content editors would like to have a preview site that would point to the master database. The site can be used to preview how the web page would look on the live site. The users aren't really comfortable using the 'Preview' option inside Sitecore. This site would point to the CMS server and be separate from the CMS site (used for content editing). The reason we can't use the CMS site to preview data is that HTML caching comes into play and content is not updated right away when a page is