30 tweets later we have reached the end of this little series. I confess it has been a bit harder than I anticipated. I had a list of 30 tweets prepared before I started. However only 60% of them actually made it... as I went along, I decided some of them where simply not interesting nor useful enough. This forced me to truly rack my brains in search of some other bits of Sitecore knowledge I could encode in less than 140 chars.

I know the final 30 that actually made it to Twitter do not constitute a comprehensive list of tips or best practices; in fact I know some people will even disagree with some of them. In any case, it was fun doing it; if someone else found it useful too then I can ask no more.

  1. Add related=1 to the parameters of the AutoPublish action to publish related items
  2. Components must always return some HTML text in the Experience Editor or they can't be selected
  3. You can make empty = null in fields by setting "reset blank" in the field definition item
  4. Use Sitecore queries in the Datasource Location field (Sitecore 8+) (see https://github.com/rauljmz/DatasourceLocationExtensions if you are in v7)
  5. Use a Sitecore query to set root item of a treelist/treelistex (+ http://getfishtank.ca/blog/treelist-data-source-hidden-functionality to filter items)
  6. Use dictionary domains to put dict entries in the content tree so authors can get to them
  7. Modify the Item Bucket Settings item to make search results open in a new Content Editor
  8. Use ItemUri when you need to pass database, guid, version and language of an item as a string
  9. When you create a new site definition remember to add the name for HTML clearance in the publish:end event
  10. Implement Sitecore.Buckets.FieldTypes.IDataSource and set it as a field source using "code:fullyqualiname"
  11. Upload any folder or file to the media library by copying it to upload folder in webroot
  12. Use the SearchResultItem.Content property to search across all text fields of an item + Name
  13. Rendering parameter templates can have standard values (only for custom fields)
  14. Set a default boost of 1 (create Std Values for Indexing template) in order to use boosting with ContentSearch.
  15. Use rules to control the structure of folders inside a bucket. Your URLs depend on it!
  16. Set WebEdit.PlaceholdersEditableWithoutSettings=true to initially create PH settings through the Experience Editor
  17. Use ItemCloning.NonInheritedFields to avoid certain fields from being cloned. Presentation details?
  18. Remember to set TargetHostName attribute in site definition. It will be used to generate cross-site URLs
  19. Use Caching.DisableCacheSizeLimits no more cache tuning necessary (OK in 64 bit machines)
  20. Change the result of a validator using Result Parameter (e.g Result=Warning)
  21. Don't forget to put the Bot detection VisitorIdentification on every page. No xDB data saved otherwise!
  22. Be brave, use the Multilist with Search field. Read this first though http://blog.rauljimenez.co.uk/multlistfield-search/
  23. For debugging or demoing analytics, create an EndSession page to commit data to xDB sooner. https://community.sitecore.net/developers/f/9/t/369
  24. Use EncodeNameReplacements to avoid %20 in URLs. IF you are in the latest greatest. See http://blog.rauljimenez.co.uk/great-urls/
  25. Security: avoid explicit denies (except for Anonymous user); deny inheritance instead. Set security on roles, not users.
  26. Hide Caching Settings etc. from component properties in the Exp Editor denying field read http://blog.rauljimenez.co.uk/hide-your-caching-settings/
  27. Set HTML caching on component definition items and leverage vary by settings
  28. Branches that create a single item can be useful. Use them to define multiple sets of initial values
  29. Rules engine rocks. Great for validation, trimming insert options. Or invoke rules through the RuleFactory class
  30. And most importantly... just because you can does not mean you should && KISS