sitecore

Difference between two different preview mode in Sitecore

╄→гoц情女王★ 提交于 2019-12-11 06:25:57
问题 Today I got into weird condition. I was doing Redirect for Sitecore item over IIS rewrite module. When I preview item from publish tab preview, it is redirecting properly. But when I preview item from presentation tab preview command it is not redirecting i.e. showing item presentation. So there are two different preview behaviors for the same item, it strike me to think about difference between these two preview options. Under Publish tab: Preview Command Under Presentation tab: Preview

XSLT: Get the closest item with a specified value defined? (Sitecore)

巧了我就是萌 提交于 2019-12-11 05:47:00
问题 I have the current structure; Item 1 - Subitem 1 - Subitem 2 - Subitem 3 - - Sub subitem 1 - - Sub subitem 2 - - Sub subitem 3 - - etc I have a field that is only defined on "Item 1". Let's call it 'Header'. When i am on "Item 1" its easy enough to extract this value, but what about when i am on the other items? Is there a way i can go through the tree (up) until i find a field called 'Header' and it has a value, and then stop and use this as a reference point in my sub items? 回答1: If you

Sitecore links inserted in Rich Text editor are not resolved to user friendly URLs

北慕城南 提交于 2019-12-11 05:32:47
问题 I saw this post but I'm not sure how to actually apply the answers. I have a basic template that just has one Rich Text field called Body. The layout looks like this: <div style="min-height: 38px"> <asp:Literal runat="server" ID="litBodyContent"/> </div> I place it on the page with the Page Editor and enter some text into it. When I insert a link, it inserts it using the item ID rather than resolving it to a user friendly path: <a href="~/link.aspx?_id=D9D103AD60DA4B318521801ADA863222&_z=z"

Sitecore NullReferenceException on GetBrowserClassString

爱⌒轻易说出口 提交于 2019-12-11 04:57:12
问题 It was a beautiful day, and I came into work and Sitecore randomly gives me this: [NullReferenceException: Object reference not set to an instance of an object.] Sitecore.UIUtil.GetBrowserClassString() +491 Sitecore.sitecore.login.LoginPage.AddBrowserAttributes() +134 Sitecore.sitecore.login.LoginPage.OnPreRender(EventArgs e) +434 System.Web.UI.Control.PreRenderRecursiveInternal() +112 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean

Sitecore using Glass mapper and MVC

会有一股神秘感。 提交于 2019-12-11 04:28:24
问题 Hi am using the Glass mapper in combination with Sitecore MVC. I created model below. using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Test { using Glass.Mapper.Sc.Configuration.Attributes; [SitecoreType(AutoMap = true)] public class GlassTestModel { public virtual string Title { get; set; } } } this is my view @inherits Glass.Mapper.Sc.Web.Mvc.GlassView<Test.GlassTestModel> <div> <h2>Hello</h2> <h2>@Model.Title</h2> </div> I also tried this first

How to publish multiple versions of content item to delivery (web database) in Sitecore?

左心房为你撑大大i 提交于 2019-12-11 04:18:48
问题 I have a requirement to allow users of the web site to see the current publish version of the item (which has passed through workflow) + the previous versions + the version scheduled to publish in future. So when the use visit the content item on the web site they will be presented with tabs to: previous , current and future version of the item. I have seen some articles how to intercept publishing pipeline but still cannot evaluate if this scenario is possible. 回答1: There is no native way to

Sitecore glass editable cannot convert lambda expression

为君一笑 提交于 2019-12-11 04:08:42
问题 I'm using Sitecore 7.5, MVC 5.2 and Glass Mapper 3.2. When using Editable() in the renderings, the error below is shown in visual studio even though it renders properly when using the site and/or the page editor. Am I missing a reference or something? Error: "Cannot convert lambda expression to type 'System.Linq.Expressions.Expression>' because it is not a delegate type" View @using Sitecore.Mvc @using Sitecore.Mvc.Presentation @inherits Glass.Mapper.Sc.Web.Mvc.GlassView<Air.SitecoreModels

Search value in body tag in Sitecore

佐手、 提交于 2019-12-11 03:27:37
问题 I want to implement search functionality, So my requirement is I want to search some keyword in body tag in all content page. I do not know how I can search keyword in body tag in Sitecore. Please guide me? 回答1: As Anton outlined, the concept of searching the Body tag is wrong for Sitecore. You want to think in terms of Content in fields of Items. Sitecore's ContentSearch is how you can achieve this. Sitecore comes with default indexes out-of-the-box that you should use for the search. You

Sitecore saveUI processor redirecting to item page after moving it

感情迁移 提交于 2019-12-11 03:23:36
问题 I have implemented a Sitecore saveUI processor for moving news items to a specific location inside a year/month hierarchical structure. It does the job well, except for the fact that when used inside the Page Editor (navigating to an item's page and then trying to save, and implicitly move, the item) I am redirected to our 404 page, since Sitecore expects the original item's url to still be valid after the operation. Is there any way to tell Sitecore that the item has been moved? I'm thinking

Sitecore - Webforms for Marketers 2.3 - Inserting a new form into a page

别说谁变了你拦得住时间么 提交于 2019-12-11 03:23:35
问题 I'm trying to insert a new form I created in Webforms for Marketers 2.3. I go to the page I want to insert the form on, presentation tab, form, Insert. I select the form I created but then get a message - "There are no allowed placeholders in order to insert a new form". I then went to Layout-Placeholder Settings-Content and added Layout-Renderings-Modules-Webforms for Marketeres - Form. No success. I've also tried adding the form while it was and was not in the Webforms for Marketers