We’re using Sitecore and to share the content between developers we’re serialising the content tree to the filesystem then checking this into source control. This worked fine in the last project that used SVN, but this new project is using TFS.
Unfortunately TFS won’t accept paths that have a dollar sign in them, ie
\serialization\master\sitecore\templates\Branches\Calendar\Agenda View Settings\$name.item
and this is a very common file name for Sitecore’s serialisation structure. Is there any way around this? Can Sitecore be changed to not put the $ in front of the file names or do we have to switch to SVN?
I did some digging around. It’s doable, however not immediately straight forward.
When serializing a tree, Sitecore invokes: Sitecore.Shell.Framework.Commands.Serialization.DumpTreeCommand. This is defined in /App_Config/Commands.config. When de-serializing, the equivalent .LoadTreeCommand is invoked.
What these commands do, is little more than invoking:
And unfortunately, to get to the functionality you need to override, it looks like you are going to have to 1) override the command in commands.config, and then create your own Serialization Manager (inheriting from Sitecore’s).
I’m not entirely sure how easy this would be, since most of the methods in this class are static members. The method you would need to override/re-implement is this one:
The filename, as you can see, is based entirely on the Item’s path. The assumption is, you could perhaps get away with something like .Replace(“$”, “!dollartoken!”) and implement the reverse in your de-serializer.
Seems a lot of work though, unfortunately.