Richard Seal
Moderator
  • Member for 5 years, 4 months
  • Last seen this week
How do I reference Sitecore binaries from NuGet?
Accepted answer
47 votes

Previously, the 9.1 packages were in a separate feed, as of March 4th 2019, these have now been moved back into the main feed. The NoReferences packages are still removed. To avoid link rot, here are ...

View answer
How do I clear the HTML cache for a specific user?
Accepted answer
29 votes

You can do this by making sure that your renderings are set to Vary by User. This adds the user to the cacheKey string like this "_#user:" + Context.GetUserName(); You can then use the following code ...

View answer
What are PackageReferences and how will they help optimise the way I deal with NuGet packages?
Accepted answer
28 votes

PackageReference is a new way to allow NuGet to manage your projects references. Before this, adding a NuGet package would update both the packages.config file and the .csproj file for your solution. ...

View answer
What is the fastest way to delete thousands of items in the content tree?
25 votes

This is another option you have if you want to use Sitecore PowerShell Extensions. Delete the items in a BulkUpdateContext - this disables events etc... an so makes the delete run a lot faster. To do ...

View answer
Is it possible to use any personalisation rules without xDB
Accepted answer
23 votes

Yes its actually very simple. You need to set the following settings: Xdb.Enabled set to false Xdb.Tracking.Enabled set to true That will disable Xdb, but still allow the personalization rules to ...

View answer
Deleting an Item with a null Template
Accepted answer
20 votes

A safer method would be to use the DbBrowser. You can find this by going to <yoursiteurl>/sitecore/admin/dbbrowser.aspx. You will get a screen where the content tree loads up on the left and you ...

View answer
How do I configure Sitecore to serve multiple sites?
20 votes

This is an addition to Kyles answer. While you can do the full site definition for each site, it quickly becomes cumbersome and really for most of the settings you have the same values. So you can ...

View answer
SimpleInjector as default DI in Sitecore 8.2
Accepted answer
20 votes

The problem with the simple injector container is that they do not provide a conforming container option. They don't like it. So to replace it with Simple Injector requires a bit more effort. In this ...

View answer
Unicorn Serialized Files to Source Control?
Accepted answer
18 votes

This is an alternative method to @Kasaku's answer - it effectively gives the same result but can be a little more flexible, especially if you are following Helix guidelines. Instead of patching the ...

View answer
What is the event called when application starts?
Accepted answer
17 votes

Ok - for attaching code to when the application starts, you have a couple of options. Initialize Pipeline The standard way to do this is via the Initialize pipeline. Create yourself a new processor ...

View answer
Do we have predictive search capability within Sitecore?
17 votes

So this depends on what you mean by predictive search. If you mean a simple autocomplete, then yes. Sitecore provide an n-gram analyzer for both Lucene and Solr. To use this, add a new field to the ...

View answer
What are the differences between update and zip packages
Accepted answer
16 votes

Internal File Structure A big difference is the internal structure of the .update package file. If you open up an update package file you will see the following folder structure: A standard .zip ...

View answer
How or where should I add a required connection string for a feature in Helix?
Accepted answer
15 votes

You would need to use an XmlTransform to do this. If you look at the Habitat demo site you can see examples of how to do this. Creating the transform file You would add your connection string to a ...

View answer
why is my Richtext field not rendering as rich text?
14 votes

Its because you are not using the Sitecore field render to render the field content. This code: var mainContent = Sitecore.Context.Item.Fields["Main Content"].Value; just outputs the raw ...

View answer
Fields Not Being Indexed in Lucene
Accepted answer
14 votes

The fields are being indexed, but they are not all marked as storageType="YES" in the default Lucene configuration. This means that the fields will be tokenized in the index, but not stored, or ...

View answer
What does each site of a vanilla 9.1 installation do?
Accepted answer
13 votes

They are mostly self-explanatory, but here is the list of suffixes with the role names/descriptions: *.cm: Content management server *.cd: Content delivery server *.collection: The xConnect ...

View answer
Move items between folders programmatically
Accepted answer
13 votes

You would want to setup a Sitecore Scheduled task to do this. You have 2 options: 1. C# Scheduled Task The code to move an item is pretty simple: var currentDb = Sitecore.Data.Database.GetDatabase("...

View answer
Creating new renderings that are compatible with SXA
Accepted answer
13 votes

This is what I worked out from playing with SxA: For your controller renderings, you need to make sure your controller inherits from Sitecore.XA.Foundation.Mvc.Controllers.StandardController Make ...

View answer
How to check access permissions on items for a user via the Security API?
13 votes

The code you have posted will always return true by the nature of how Sitecore security works. If SelectItems() returns an item, that means the Sitecore.Context.User can read it. If the current user ...

View answer
What is the best practice for managing Web.config changes in a solution?
Accepted answer
13 votes

Pre Sitecore 8.1 (which splits out the Sitecore node into /App_Config/Sitecore.config) - I generally create my own Sitecore.config and patch that into the web.config in the same way as the connection ...

View answer
When to use Sitecore.Context.Items and why?
Accepted answer
12 votes

Sitecore.Context.Items is a collection that exists for the lifetime of the http request. I use that collection for times when I need to store some data as part of a request where I will need that ...

View answer
MVP Nominations - What should NOT be added in the forms during nomination process?
11 votes

Something else to add here is that it will depend on the type of MVP you are going for: Technology MVP All of the above. Doesn't matter how long you have been working with Sitecore or what your ...

View answer
Dynamic Placeholders Not Working in Sitecore 9
Accepted answer
11 votes

The key for a dynamic placeholder uses the parent unique rendering Id to become dynamic, it also appends an incremental number in case you want multiple placeholders. In your example: <!-- Right ...

View answer
Handle all Custom Errors in Sitecore MVC
11 votes

So for Sitecore - a global error handler in the global.asax will not work properly. The better way to do it is to override the code that calls each rendering and handle the errors there. ...

View answer
Is there any alternative to @Html.RenderAction in Sitecore?
11 votes

Although .ViewRendering and .Controller will work, there are performance issues with both of those methods. Both methods will bypass Sitecore's output caching mechanism completely, so every page on ...

View answer
Help with ContentSearch LINQ query syntax
Accepted answer
11 votes

To be able to search on a field in the Sitecore SearchAPI you need to add that field to a model. So you could create a new class derived from SearchResultItem and add your tags field in: public class ...

View answer
Is it possible to use conditional renderings with Sitecore MVC
Accepted answer
11 votes

Conditional renderings work fine with MVC. For version 8, you must have Analytics.Enabled set to true so you can get to the personalization section of the presentation. "Global" conditional ...

View answer
Config patch/hack to temporarily disable index update
Accepted answer
10 votes

You could create a patch file that sets all the indexes strategies to manual, that would effectively disable any automated updates that might happen as a result of installing a package or other ...

View answer
Can HelixBase solution be used as a base solution for a brand new Sitecore project?
Accepted answer
10 votes

If you read the readme.md on the HelixBase github account, that seems to be exactly what it is for: A Sitecore Helix based solution which can be used for Greenfield projects. Tackles some common ...

View answer
Is there a way to reference another database in Multilist with Search
10 votes

Yes - in the source property of your field item, you can use the parameter DatabaseName to set the name. So you might have something like: DataSource=/Sitecore/Content/MySite/Subscriptions&...

View answer
1
2 3 4 5
12