Multiple item reference indicator in Sitecore Experience Editor

In Sitecore, we build pages adding renderings to a page. Renderings typically have datasources pointing to items carrying the content. Thereby it’s really easy to reuse content. In a scenario where a piece of content is used on multiple pages, it’s maybe not clear to content author that changes to the content will actually affect more pages.

So I wrote a little indicator that will show a warning indicator in the Sitecore Experience Editor (aka Page Editor) when the content of a rendering is being used on other pages as well.
Continue reading

An odd Sitecore field validator

Today I faced a Sitecore website rollout problem I’ve never thought of before. When doing a multi language/multi market solution, it’s common to use cloning or other kinds of fallback techniques. This is typically very good, but sometimes it brings some new problems as well.

The scenario I faced was that I wanted to make sure that certain fields did not inherit any value from standard values, default values or via cloning. In my particular case, I wanted to ensure that certain integration settings where defined for each website, even if the sites were cloned. Maybe not a very common requirement, but here’s another example:

Let’s say you have a field that stores a Google Analytics UA code, maybe that code should be defined on each locations where it’s used. Not inherited between sites. (Depending on how you’ve configured GA of course.)
Continue reading

TDS Sync settings

After a fresh install of my whole dev environment onto a new nice machine, I realised that Hedgehog Team Development for Sitecore (TDS) isn’t by default configured the way I like it.

In the Options window in Visual Studio, there is a section for TDS Options. In the Sync Window you can specify a set of field names that the Sync with Sitecore should ignore when comparing Sitecore items with your project items. By default, TDS ignores “__Created by“, “__Owner“, “__Revision“, “__Updated” and “__Updated by” which makes perfectly sense. Essentially, this means that if you open an item in Sitecore and just hit Save, some of those fields will be changed but nothing else. Therefore is no meaning in synchronising those items with you project, unless other fields are changed as well.

TDS Sync settings

For some reason the “__Created” field isn’t there by default and I guess one could argue that it should be, but I found it better to ignore that field as well. The main reason for that is as projects evolve, we may upgrade Sitecore to a newer version or a new team member may join that hasn’t followed the same upgrade path as the rest of the team. Instead (s)he just installs the current version used by everyone else in the team. In this case, Sitecore items will have new Created dates and therefore a whole bunch of items are marked as different from the ones you have in the project.

TL;DR In Visual Studio, open Options, navigate to TDS Options and add “__Created” in the Sync window.

Quick fix for Experience Editor

In later versions of Sitecore, there is a new link field called General Link with Search. As the name says, it’s basically the same as the old one but with an extra search option. In later versions of Sitecore, there’s also an out-of-the-box fix for clearing links in the Experience Editor, implemented in the same way as sitecoreclimber blogged about a few months ago.

Clear LinkHowever, in a clean Sitecore 8 install, the “Clear Link” web editor button item is missing in the core database for General Link with Search. You can solve this by just copying the existing command from General Link.

Sitecore MVC Data Source query support

Sitecore query is a very powerful tool for selecting items and is used in many places in the Sitecore CMS. However, there are a few locations where this is not supported by default, and there are good reasons for that too. One is performance. Sitecore query is powerful but can be far more expensive to execute than referring to an item using a regular Guid. Sitecore often provides you with a search/query tool to find a data source, but it’s only the target Guid that’s stored typically.
Continue reading

Synchronize Sitecore Compatible Rendering

In Sitecore, as well as in all other good CMS’, contents and layouts are separated and there are various ways we can control the rendering of a piece of content. Typically we use Rendering Parameters or Compatible Renderings or a combination of the two. This post will just look into compatible renderings.

When you have two renderings that can render the same piece of content, you edit the Compatible Renderings field of the rendering item. This enables the Replace Rendering button in the Experience Editor (aka Page Editor). It’s worth mentioning that when switching renderings using this technique, the data source etc are being kept.

This adds some maintenance though. If you edit rendering A and say it’s compatible with rendering B, you also have to edit rendering B and say it’s compatible with rendering A. Annoying, right? So let’s solve this.
Continue reading

Sitecore MVP 2015 Winner

Sitecore MVP Technology 2015Thank you Sitecore for awarding me “Technology Most Valuable Professional (MVP)” again! Third year in a row. This year 141 people worldwide are named MVP this year. There are more than 26,000 developers in Sitecore’s global network.

Now it it’s ninth year, Sitecore’s MVP program recognizes individual technology and digital strategy advocates who share their Sitecore passion and expertise to offer positive customer experiences that drive business results. The Sitecore Technology MVP Award recognizes the most active Sitecore experts from around the world who participate in online and offline communities to share their knowledge with other Sitecore partners and customers.

“We are grateful for the leadership, expertise and ongoing contributions that Mikael Högberg has made to the Sitecore community,” said Lars Fløe Nielsen, Co-Founder and senior vice president, technical marketing, Sitecore. “Mikael Högberg has demonstrated mastery of our technology and exemplifies the spirit of Sitecore.”

Again, thank you Sitecore!

First look at Saleae logic analyzer

Sale Logic Pro 16 RedToday I received my long awaited Saleae Logic Pro 16 logic analyzer. This fantastic little device has 16 input channels that can be individually configured as digital or analog inputs. With its USB3 interface, it’s able to capture data at pretty high speed too. Up to 500MS/s (million samples per second) digital and 50MS/s analog, but it drops a bit when using more channels though.

Saleae Logic Pro 16

To give it a first try, I hooked it up to the regular Arduino Uno compatible Sparkfun RedBoard that I already had running. I tapped into the I2C wires and an analogue wire and started sampling. It worked like a charm right away with no trouble at all. The screenshot below is actually from my very first run. A cool and neat detail are the wire colouring that follow the common resistor value coloring.

Saleae Hookup

When writing this, the Pro 16 is brand new and requires the latest beta software. It’s still very simple to install, use, and seems to be quite stable as well. The UI is intuitive and is quite easy to navigate. The protocol analysers are my favourites. Just attach an analyser and tell it what channels corresponds to each line, and it’ll decode all data.

Saleae software

It comes with a lot of protocol analysers for common interfaces, such as I2C, I2S, SPI, 1-Wire, CAN, JTAG, Midi, Modbus, PS/2, USB 1.1, HDMI etc. Now I hope I can find some time to write custom analysers for the DHT22 and WS2812. But it’s always that “spare-time-issue”…

Sitecore 8 preview: new UI

One of the many changes and new features in Sitecore 8 is the new UI. Gone is the old “XP-style” desktop and it’s replaced by a more “Win8-style” modern UI. Under the hood, since a few versions ago, Sitecore is in the transition of replacing Sheer UI with SPEAK (Sitecore Process Enablement and Acceleration Kit) UI.

Sitecore 8 has a new clean, nice looking login screen. Gone are the hidden “Desktop”, “Content Editor”, “Page Editor” and “Launch Pad” options. It takes you directly to a new launch pad where common tasks are easily available. It’s more focused around editors and marketeers, but administrators still find easy access to the Desktop and Content Editor.

The lighthouse is gone
Firing up the Desktop, you find a “Windows 10-style” (?) desktop. Well, think Windows 8 but with a proper start menu, like the way Windows should have been in the first place. The old default lighthouse background image has also done its job by now and is replaced.

At a glance, the Desktop and Content Editor seems to be replaced by SPEAK, but looking under the hood, it hasn’t. Though I haven’t digged too deep into the internals yet, the components are still the same in the Desktop/Content Editor, but they are re-skinned in such way it looks like the other SPEAK UI’s. This has both pros and cons.

The good thing is that most plugins, modules and other adaptations that you’ve implemented or installed, will probably work without giving too much of a headache. That is, if you haven’t provided your own css’ to your plugin of course.

On the downside is that it isn’t SPEAK. Even though we’ve over time learned how to make changes to Sheer UI in Sitecore 6.x/7.x, it wasn’t really meant to be extended (hope I remember right what Jakob Christensen said on Barcelona). The fact that DataView still returns a set of native Items instead of DTO objects and the controls for editing fields are virtually impossible to reuse in a custom way, is holding me back from creating all sorts of really nice stuff.

A new take on multi lingual sites
To me, the ability to version renderings is one of, if not the most, valuable feature in Sitecore 8. In previous Sitecore versions, the fact that the common Rendering field is shared, quite often becomes a show stopper when aiming for a common site structure. So you were left with the only option of having one tree per market/language and all the problems that comes with it. Well, cloning does help, especially combined with custom tools for managing multiple trees and having them in sync, but usually it still generates a lot of overhead and requires extra thoughts.

In version 8, Sitecore has added a new versioned Final Rendering field. The old shared Renderings field is still there, untouched, so existing code will still work. The Final Rendering fields just adds another rendering delta, so the functionality is the same, well proven one, as is already being used in the standard values and clone inheritance structure.

So what does this mean in reality? In my opinion, it means a lot more than meets the eye. You can now build large multi language, multi market web sites in one shared structure, without having to sacrifice too much functionality. Developers will configure default renderings in Standard values, as we’ve always done. Editors of a master site will, when needed, edit the old shared Rendering filed. Local editors can then be given access to edit only this new Final Rendeing field, so that they can’t mess up other language versions. This also makes governance of multiple markets/languages a lot easier.

Sitecore dataviews

Have you ever needed a way of customising the content tree in Sitecore? I had, and got some excellent insights on how to do this, and some more info about Sitecore internals from the fantastic Sitecore support team!

I had a scenario where I wanted to filter out some items from the content tree, in both the Content Editor and from the Navigation bar in the Page Editor, that where not relevant to certain users. In my particular case, I have a common content tree that is translated into many languages, but some sections, such as a news section, contains a lot of locally produced items. Those items typically have only one language version, so those sections becomes very cluttered, with a lot of items that is just irrelevant to all the other content editors. I.e. there are a lot of items that don’t have a version on the current language, and there’s usually no need to translate them either.

So, I wanted a way to hide those non-translated items from the content tree, depending on the current selected language. With some help from Sitecore support, we came up with the idea of implementing our own Master Dataview.
Continue reading

Sitecore 6.0-7.0 and Chrome 37+ showModalDialog()

Since Chrome version 37, the deprecated showModalDialog has been disabled. Firefox is about to do the same and has been sending out deprecation warnings since version 28 as well. Sitecore version 6.0 to 7.0 uses this javascript method to open up dialog boxes, and Sitecore has released a patch for it. Sitecore 7.1 and above does not use this deprecated method.

RTE Show EditorThe patch works well in the Content Editor, but we’ve found that it doesn’t when running Sitecore in Desktop mode. When editing items, the “Show Editor” button no longer works for RichTextEditor fields. Looking at the javascript console you get the error “Cannot find RTE frame object”.
Continue reading

Hello MicroView

MicroView on FingerMy intention was to spend this evening playing around with Sitecore 8 and blog about it, but unfortunately there were some trouble with the distribution of the Technical preview. But today I received a long awaited UPS package with two MicroViews. It’s basically a small Arduino with a 64×48 pixel oled display built into a standard DIP package.

I found the device really simple to work with. Just hook it into to a computer using a FTDI interface and program in with the common Arduino IDE works really well! Geek Ammo and Sparkfun has done a really good job in making a user friendly product. So, instead of the standard “Hello World” program, I decided to try do something a little bit more useful with it as a first project.

In our vacation house in Lappland, about 1000km away from home, I have a little Raspberry PI hooked up with some sensors measuring temperate etc. It sends this data periodically to one of my servers at home. Using another Raspberry PI at home, I made a very simple little script that gets the current sensor values and transmits it to the MicroView over a serial line. The MicroView then reads this data and displays the current indoor and outdoor temperature and the indoor humidity at the vacation house.

Microview WeatherWell, it’s not very pretty, actually it looks quite ugly, but as I write this blog post, it’s only three hours since I unboxed the MicroView. (The poor picture quality doesn’t help.) Now that’s what I call rapid prototyping!

Maybe next project could be showing some of the Sitecore 8 launch pad diagrams of, for example, campaign conversions and visit values, on the MicroView 🙂

Sitecore Date Time picker with time zone

Dealing with date, time and time zones are really quite simple, but developers tend to screw things up over and over again make a huge mess of it. There are just a few things to keep in mind, and you’re good to go.

Update: I’ve now posted some code on github that can be used to make this Sitecore field: Sitecore.DateTimeZoneField

Continue reading

Sitecore 7.2 is out!

Sitecore 7.2 is just released and contains a lot of updates. Nice to see that a lot of things has been improved regarding publishing. The publishing dialog has been updated as well, incorporating all the features I’ve previously blogged about.

Support for IE11 and MVC 5.1 is there as well and the search UI is now a bit more intuitive, enabling “+” and “-” prefixes to indicate search logic. But I just don’t get the business value of the new language specific multivariate testing feature. Looking at how it’s implemented, I believe that feature was a bad move. Why didn’t Sitecore focus on unsharing the __Layout field instead?

A lot of small fixes has been made under the hood as well, such as improved caching and you can leave out the links database on the delivery environment. Nice!

Full release notes are here.

SXSW Day 4

2014 SXSW InteractiveIt’s been a bit hard to find clear trends, or brand new things, here at South by South West. It’s been more about refining things we already now and a lot of areas are maturing more and more. For example; wearables, 3D printers, the maker culture, connected cars and so on isn’t really new but are discussed a lot. We’ve known about it for quite some time now, but people starts to get a better understanding on how to relate to all this.

However, one area that is getting a lot of attention is personal privacy and what happens when everything is online. Lots of sessions talks about consequences of big data, meta data, data from devices (related to Internet of things), owning your data, mass surveillance and so on.

This area obviously got a lot of attention on day four, having two main sessions on Edward Snowden. Starting of with Snowden 2.0: A Field Report from the NSA Archives with Barton Gellman who is one of three journalists having direct contact with Snowden. A really interesting talk enlighten the enormous impact of PRISM and other massive data collection initiatives have on personal privacy. Nice to see a journalists that actually understand the technical stuff going on here and is able to share it with a wide audience. Now it’s not just the tin foil hats that starts to understand what this is all about.

Next up was a streamed live interview with Edward Snowdem himself, A Virtual Conversation with Edward Snowden. I wasn’t sure they would actually pull this off, but with heavily encrypted lines through seven proxy servers, they managed to get video streamed interview with him, though the frame rate was like 1 fps. The main problem today is that reasonable secure tools, such as PGP, are far too complicated for regular users. There may be many views of Snowdens actions, but he’s certainly made both people and companies aware of the problem of misusing mass surveillance data and we’re seeing more and more services being encrypted by default. But there’s still a long way to go.

During the two sessions, a not so well known issue was highlighted, that NSA partnered with global companies to deliberately put weaknesses in security applications and weakened random number generation in common used encryption algorithms, in order to “pass government approval”. When widely used algorithms, TPM-chips etc are compromised, you cannot trust anything being really secure. They might have thought mass surveillance was to be a good idea, but in reality it didn’t work.

Snowden argues that there is really no way to hide from NSA if you’re a target, but if we learn how to leverage from encryption, and the tools become easy to use, breaking the encryption would be too costly and of no value for mass surveillance. Unfortunatly it seems like we need whistleblowes, such as Snowden, for big companies to get it, and have theirdata and connections be secure and encrypted. What do we need to do in order to ensure all other companies follows? A more in depth interview summary is here.

Moving on to some trend spotting. There’s a lot of buzz about wearables, but finally I saw something new. Smartphone connected illuminated T-shirts that is made of soft cloth, is washable etc as any other textile. No circuit boards here! Those are still hand made and very costly, but they’ll soon be affordable. Trend spotters are also talking a lot about google glasses, having sensors everywhere, especially in the sports area, where we’ll be able to monitor heart rates, speeds etc of athletes. Some argues that sensors in our clothes will soon solve a lot of health care issues as well. A lot of focus is also on autonomous cars and what we’ll have on the journey getting there, such as the car knowing where your heading and so on. But of course privacy comes into play here as well.

SXSW Day 3

2014 SXSW InteractiveAnother great day at South by South West! Todays schedule started a bit later, and apparently we’ve change daylight saving as well. Didn’t know that until in the afternoon. Phone and computer doing its job 😉

My plan for today was to just stick around the major session halls in the Austin Conference Center, trying to find good speakers in favour of subject. So I found myself mostly in the large main keynote session hall listening to whatever was presented there. This turned out to be a really good move.

Dean Kamen Robotic "Luke" armDean Kamen, best known for inventing the Segway, held the first session. He also showed his robotic “Luke” arm and his projects on creating drinking water and electricity for developing countries. A lot of focus got to his FIRST project, For Inspiration and Recognition of Science and Technology, to inspire students at all ages through sports.

Next up was Stephen Wolfram on Injecting Computation Everywhere. He’s the creator of the Mathematica computation system. He showed live demos of the awesome Wolfram language, connecting linguistic analysis with real world data with mathematical and logical operations resulting in amazing small pieces of applications that he deployed to live cloud API’s. Watch out for the upcoming Wolfram Programming Cloud and try out the website. Try it out and ask questions, such as “Where is ISS”, “Height of Petronas tower”, “sunrise to sunset in gothenburg”, “Cities in Sweden by population”.

Todays keynote The Future of Genetics in Our Everyday Lives with Anne Wojcicki, founder of 23andMe, gave a little more insights on US health care and the forces driving patient treatment in favour of preventive health services.

Wrapping up todays sessions with a portion of Wearables & Beyond With Shaq, hosted by Rick Valencia and Shaquille O’Neal. Sorry guys, putting an ex-baseball & rap star on the scene won’t compensate for lack of content.

ExoskelettonToday was also the opening of the SXSW Trade show with a whole bunch of exhibitors. A bit too much to grasp in an hour, but an exoskeleton, an interactive billiard table, small satellites, vinyl engraver and scanning post-it notes into Evernote caught my attention. Thanks Sitecore for the power bank charger! Invaluable these days.

SXSW Day 2

2014 SXSW InteractiveI took a dev track on day two of SXSW, starting of with Star Trek UX | UI Rules for phones, tablets and TVs. The idea was to take the simplicity of Star Trek UI into regular UI, such as plain graphical elements, leverage from voice commands and audio, leverage from large screens and keep things simple.

Next up De-Suckifying Third-Party JavaScript with Kent Brewster on how to ship widgets that will run on other web sites. Among things, he’s been working a lot on the Pinterest API. Key take away: Be very careful when building this kind of stuff or you’ll break others websites and host your code on github or equivalent. As a user of this stuff, you’ll have to trust the author, so select widgets with care. Consider self hosting. Kent’s presentation is here (navigate with arrows).

Next up was CSS Pre-Processor Myths with Ramon Lapenta. I’m happy to see his survey that the majority of developers (~80%) in Europe leverages from such tools. Strange it’s almost the other way around in America. To summarise, do use it!

Then I took a short trip to the SXSW Gaming Expo and SXSW Create. Nice to see all these creative kids playing around with 3D-printers building hexacopters, sewing E-textiles and creating all sorts of cool stuff. I also had the time to say hi to the nice guys at Sparkfun and check out a laser cutter. The Gaming Expo on the other hand, unfortunately, wasn’t worth the ten minutes I waisted there.

Instead I headed back to the keynote conversation with Dr Neil deGrasse Tyson. A really entertaining speech about education and inspiring people to learn stuff.

Continuing my dev track, I went to Jeremiah Lee Cohick great speech, full of energy, on Design Patterns Beyond REST. He summarised all the things we developers always should do, but sometimes finds excuses not to. One of my favourites was developers complaining about it’s hard to make an API do this and that… “Well, I don’t care if it’s hard for you. Solve it, and make it easy for all others that’s gonna use it!”. Jeremiah argues that API’s should be simple, descriptive and intuitive, so they are simple to understand, debug etc, and I couldn’t agree more. My favourite quote: “The secret to machines talking to machines is to speak human first”.

Jeremiah’s and Kent’s sessions was by far the best dev sessions today! Thank’s! The others wasn’t really up to the level I expected unfortunately.

What could be better than wrapping up a long day with a panel discussion about cats on the Internet.

SXSW Day 1

2014 SXSW InteractiveFirst day at SXSW, Austin TX, was a great start of a fantastic event. My day started quite nice an slow, with the some queueing and light sessions about UI design and Digital Disruption – The Next Wave of Innovation.

Then on to a bit more comprehensive session about the Lego eco system and their fans. This session talked about the fine edge of controlling a brand and use your fan base, without having a huge mob turning against you. A really good discussion about how grown up Lego fans improve the brand, but stil kept on a level where it applies to virtually any brand.

Then on to todays keynote with Austin Kleon and his new book “Show your work!”. A great speech starting off with Picasso, Vampires and Human spam. There are no geniuses, only sceniuses. “Shut up and listen” to people, credit people and their work, share your work and make relevant connection and you’ll succeed.

Then on to a short but interesting session about “Designing Smart Objects for Emotional People”, talking about how our machines can sense our feelings, through eye tracking, touch, breath, speech etc.

Best session today was the panel discussion about “The Future of Making” with Joi Ito from MIT and Tim Brown from IDEO. A wonderful mix of design tools, gigant 3D printers, biochemistry, self building structures, custom fabrication etc, discussed from both the individual and global perspective with a nice meta perspective touch. Just awesome!