I’ve packed up all things Sitecore related and moved to my new home at:
http://www.sitecore.net/en/Community/Technical-Blogs/Dev-Sitecored.aspx

By now this blog should be off the main Sitecore RSS feed so this shouldn’t be a double post except for those of you who subscribe to my blog directly (thank you).

For now this will lay dormant but I might from time to time post non-Sitecore related musings.

As promised here is the recording of the Sitecore Performance Webinar:

http://mediacontent.sitecore.net/webinars/SitecorePerformanceWebinar/

Also since the resolution of the video isn’t high enough to see the code I’ve also included a Sitecore package containing all the code samples I used during the presentation which you can download here.

I really hope this is of use to everyone, feel free to post any questions or suggest additions that could have been made to the webinar.

I know I should be posting a video of the performance webinar but at over 350mb finding a decent way to host it is taking longer than expected. Instead I thought I’d post a little module I wrote which should help anyone who is having trouble keeping track of what items have overridden the presentation values in the standard template.

This is a common problem and becoming even more so as more people take advantage of the more advanced features in the Design Panel and OMS. The module is pretty straight forward, you install it and then can switch on and off an actionbar warning for overridden values as shown here:

You can then click on the icon to reset back to the standard values, it also shows a different tooltip/icon if the value is overridden but the same as the standard value.

Download

Thanks to everyone who attended Fridays webinar, as promised I’m uploading a recording but converting codecs, hosting etc is taking time. In the meantime here are the slides from the presentation, I’ll follow this with the code samples from the demonstrations.

Slides

Quick post, I’m going to be running a Webinar next month on how to get the most out of your Sitecore site in terms of performance and stability. You can reserve your spot here and if you’re not able to make it I’ll be recording it for download later.

It’s going to be a technical deep dive so if that’s not for you then feel free to forward the invite url to anyone who might be interested.

Fri, Jul 23, 2010 10:00 AM – 12:00 PM AEST

https://www2.gotomeeting.com/register/872516754

  • Technical Introduction – What should we be able to expect from Sitecore in terms of performance?
  • Divide and conquer – First steps, how to break down the problem.
  • Starting on a solid footing – Avoid “gut feelings”; get solid stats on how the site performs.
  • General improvements – What can we do outside of Sitecore?
  • Sitecore specific improvements – What can we change in Sitecore?
  • Content Entry – How can we speed up the Sitecore UI?
  • Next steps… – How to maintain performance improvements.

Working at Sitecore Australia brings me into contact with a lot of interesting problems and gives me the opportunity to solve them in (hopefully) interesting ways. A customer recently made the fairly common request to find a way have Items appear in more than one place. What I mean by that is they were looking to have an item appear as a child item to multiple parent items, an example being a book item appearing under multiple genre items.

For this I wrote a Data Provider module called ItemMirror, below is a package with the book/genre example I mentioned and I’ve also included the code, both will be up on Shared Source very shortly.

Package

Code

Typically the solution to this problem is to have a multi-select field such as a treelistex on each of the genre items and select the books you want to appear under it, you then can leave it up to the renderings to sort out where each book appears. In the vast bulk of cases this is a sufficient solution but the customer felt that in this case it left 3 unresolved issues:

  1. Increased difficulty editing the book items.
  2. Sub-par URLs, instead of landing on site.com/genre/book.aspx you would either land on site.com/genre.aspx?bookid=xxx or link to site.com/bookrespository/book.aspx
  3. Increased difficulty creating renderings.

What they said was needed was the ability to have book items that are otherwise stored in the book repository (called bookpile in the image above) shown under the genre items as children. This would neatly solve all 3 problems they were having, only problem being that it wasn’t possible out of the box with Sitecore (yet) hence the need for the ItemMirror module.

Configuration of the ItemMirror is done via the ItemMirror.config include file which you should find in App_Config/Include once the package is installed. The only line you’ll want to change is the one which configures the active template and the field which picks the items to replicate:

<template id=”{2BA6F255-67F5-4EDD-B626-11224F707658}” field=”bookSelection” />

The module should support multiple templates so you can have both genre/book and category/product running on the same website.

Quick Disclaimer

  • Documentation is forthcoming, in fact the lack of that is what’s holding it back from going on Shared Source really, think of this as the beta release.
  • Yes the virtual items publish and yes they become “real” once that happens, this is mostly because I didn’t feel that having the ItemMirror system running on the web database was particular wise or necessary.
  • The use of the master database is currently hardcoded in, if anyone can “solve” the XPATH statement needed at Line 75 in MirrorProvider.cs please post in the comments, otherwise I’ll have it solved for the Shared Source version.

Otherwise enjoy and feel free to suggest improvements.

Update:

A few quick replies based on comments via email/msn.

You could have used the Inline Item List Field.

Yes but sadly it wasn’t actually released when we started, it could in fact still be used alongside the ItemMirror.

What about Wildcard items?

Yep, that would have solved the URL issue but the customer wasn’t keen on the * items.

Is writing renderings to pull items from a multilist really that hard?

Well no, not for you and I but the customer was looking to do a lot of development in house, been able to simply render all child items would make their life a lot easier.

Isn’t this just Item Proxying?

No, come on guys, read the post, install the module!

What about stability/performance/daisy-chaining/other?

All good concerns and really this is why I made sure it only runs on the master database and gets turned into real items on publish. Daisy-chaining should only be possible if you explicitly set it up that way in the include file, in that case best of luck to you. Stability and performance were fine during development (isn’t it always?), it’s got two layers of caching, item and entity which should in theory cover you but it’s still needing some stress testing before it goes on Shared Source. Any volunteers?

HTML is a bit of a tricky beast, for a long time you couldn’t make any changes at all without technical knowledge of how it works. Quickly enough people created HTML “editors” but until recently they’ve been well, frankly rubbish. Thankfully the one used it Sitecore ticks all the boxes; it has all the standard editing features you’d expect to see and behaves in a WYSIWYG fashion.

The only downside to this process however is that rich text editors still can’t replicate a web developer’s ability to produce HTML that is always compliant with XHTML standards, especially once all the features of the rich text editor have been enabled.

This presents a particular problem for projects caught between the conflicting requirements of 100% compliant XHTML websites while also allowing non-technical content editors to make changes using the fully featured Rich Text Editor. Here are 5 suggestions that will help you with both of these:

  1. Rich Text Editor Snippets – This feature in Sitecore allows you to insert prefabricated HTML templates that have already been validated for XHTML compliance. An example would be a div containing Lorem Ipsum text with a placeholder image floating to the right. Content editors can then insert this snippet into the RTE via a dropdown menu and then change the filler text and image to suit, the underlying HTML itself however will be unchanged. A good example of how this can be done can be found on learnsitecore.cmsuniverse.net.
  2. Sitecore WebStylesheet – Any CSS classes stored in this style sheet (default.css) will be available in the rich text editor via the “Apply CSS Class” dropdown menu. This allows editors to style their content according to a predefined style guide instead of using hardcoded inline styles. This also greatly reduces the amount of non-transitional compliant HTML generated as most of the invalid statements are regarding style related tags such as align=”left”. Additional details on configuring this feature can be found in the Client Configuration Cookbook on the Sitecore Developer Network.
  3. Automatic Workflow triaging of content – With a small amount of development a workflow action could be created that would automatically put items that fail validation into an “Awaiting Web Developer” state. From here someone with technical HTML knowledge could manually fix the errors and then move the item into the normal “Awaiting Approval” state. This way the content editors would no longer have to worry about HTML validation and items would only be escalated if special attention was required. I’ve gone ahead and created this in a previous blog post which you can find here.
  4. Customize the RTE Profile – Each rich text field is associated to a profile which defines which buttons are available (e.g. bullet points, bold, italic). I would recommend standardising this across the site and only removing those features which aren’t required. More information on configuring the RTE profiles can be found in the Client Configuration Cookbook on the Sitecore Developer Network.
  5. Reduce use of Rich Text fields – In many cases the problem can be avoided in its entirety by simply redesigning the page so it no longer needs the rich text field, you can achieve this by replacing it with a series of single and multi-line text fields. This has the added bonus of keeping content and presentation separate which allows for greater reuse and flexibility.
Follow

Get every new post delivered to your Inbox.