sitecore

Unit Testing Sitecore using NUnit, serializing content

白昼怎懂夜的黑 提交于 2019-12-13 11:49:53
问题 In my business, I am working on Unit Testing, after finishing an example in a .NET application. We want to use a standard .NET Unit Testing project. We also want to mock the Sitecore data by serializing the Sitecore objects. I have been looking for, but could not find a good tutorial to do this. How can I do this? 回答1: Interesting videos on Youtube Sitecore Unit Testing video by gravypower. Another interesting video by codeflood. Most knowledgeable for me was this video by Alistair Deneys

SEO - Unreachable pages [closed]

荒凉一梦 提交于 2019-12-13 09:58:17
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I'm trying to make a personal web analyzer site using PHP.. I bought a script to get other seo data... Now I want to have the "Unreachable Pages" evaluation like the one shown at the bottom of this page http:/

Sitecore Experience Accelerator License Error – Sitecore.SXA Not Found

﹥>﹥吖頭↗ 提交于 2019-12-13 07:21:19
问题 Is Sitecore Experience Accelerator(SXA) a licensed module ? I Followed below official Site and install the SXA. Sitecore Experience Accelerator 1.0 Initial Release In above SXA official site not mentioned about licence. We are using Sitecore Experience Platform 8.2. Before install SXA, I installed package "Sitecore PowerShell Extensions-4.1 for Sitecore 8" ,after that I installed package "Sitecore Experience Accelerator for 8.2", successfully installed. I able to create "tenant folder" and

Sitecore Cache Issue

折月煮酒 提交于 2019-12-13 06:57:58
问题 I set "cacheHtml=true" in web.config file and set sublayout's (ascx file) cache setting. Whenever I reflash the page, I can see the increasing "From Cache" count in admin page. However, the sublayout(.ascx) doesn't get all its template field values on the page. Suppose that there is CSS class name, like "nav-list", in its template field and HTML result should look like this. <div class="nav-list"> something </div> But, if I check "cacheable", it shows like this. Otherwise, it shows correct

Sitecore Index error - Root Item Not defined

北城以北 提交于 2019-12-13 06:20:03
问题 Any help regarding below issue will be highly appreciated. We are using Advance database crawler for sitecore CMS which interanlly uses Lucene.NET. We are getting below error when we try to log into the desktop of sitecore Heartbeat 16:23:24 ERROR Exception in alarm clock event subscriber. Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Source: mscorlib at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo

Get rendering parameters when multiple sublayouts of the same type are on the page

爱⌒轻易说出口 提交于 2019-12-13 05:49:45
问题 I need to get the rendering parameters programmatically from my sublayout. Currently I do this as such: var sublayout = ((Sublayout)this.Parent); //Get all rendering var renderings = Sitecore.Context.Item.Visualization.GetRenderings(Sitecore.Context.Device, true); //Get the first rendering that matches the current sublayout's path var sublayoutRendering = renderings.FirstOrDefault(r => r.RenderingItem.InnerItem["Path"] == sublayout.Path); if (sublayoutRendering != null) Response.Write

Can I programmatically find a Sitecore item's parent matching a certain template id?

烂漫一生 提交于 2019-12-13 05:47:12
问题 I have a custom Sitecore command that I would like to expand upon to determine if the current item has a parent item matching a certain template id. When the command/button is clicked, I will have access to the current Item . My initial attempt, since I had issues with escaping the FullPath for use in a query, was to loop through the parent item (and then that item's parent, etcetera) to determine if any matched the template. However, there seems like there should be a better way to do this.

Get user created date in sitecore

偶尔善良 提交于 2019-12-13 05:15:47
问题 How to get created date of a user in sitecore. I am creating a script in c# to list out all sitecore users and its profile fields such as Last active date, Last Updated Date etc. I have got all users in a list using - var users = Sitecore.Security.Accounts.UserManager.GetUsers(); foreach (Sitecore.Security.Accounts.User user in users) { ltLastActiveDate = user.Profile.LastActivityDate; ltCreatedDate = user.Profile // ? No idea } I have no idea how to get created date for user. 回答1: Try it:

Visual Studio taking long time to build and load solution because of Nugget

余生长醉 提交于 2019-12-13 05:14:39
问题 Visual studio is taking a longer time to open the solution ,to build and I just have 6 projects.When I examined the fiddler I see below requests to nugget and notice that once this request is complete the visual studio becomes responsive. Can any body suggest the below: what are these requests for nugget? Is VS becoming slow because of this as I am suspecting? How to stop these requests? 回答1: These requests can be a result of your solution enabling automatically restoring NuGet packages, You

Sitecore - Custom field, add unique value on create [closed]

守給你的承諾、 提交于 2019-12-13 05:14:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to create a field that generates a running number. This number will be automatically generated everytime I create a new item and has to be unique. Any examples of how this could be implemented? I don't want to use the Sitecore item ID for this. 回答1: You can implement a custom token and just use your field