Today was my first experience with "alpha" version of Sitecore migration from 5.3 to 6.0.
What I can say, that was not so bad :-). Anyways, I have to say that my site was pretty simple and did not have heavy customization (no custom fields, default devices, no proxies).
I migrated only master database because I had only default security objects in my solution.
I followed all steps from documentation and did not face any problems. Altogether it took about 3 hours to migrate my content and clean up my solution from migration tool. Not bad! Again that was the first time when I saw this tool.
In addition I spent about 2+ hours to adjust my code to spin it in Sitecore 6.0.
The most common issue for my renderings was related to pulling out media url using "sc:fld()" function and media item variable.
I had to substitute "sc:fld()" for "sc:GetMediaUrl()".
I thought I would have to do some modifications to get in-line editing working in V6. I was surprised that old buddy "sc:dot" represented this opportunity.
So, as a result it is not so bad as it sounds at the first glance ;-).
You should try it out!
This blog is a collection of challenges that I had a chance to work through in Sitecore.
Friday, July 25, 2008
Thursday, April 17, 2008
Share site resources among several sites
If you have lots of sites with similar structure and presentation layer you can make them use resources of one Sitecore site from web.config file. To do this you can create custom SiteResolver and insert it in <httprequestbegin> pipeline just after the native SiteResolver processor.
Using this approach you should have custom SiteResolver processor and special config file where you can map your sites to the same instance of Sitecore site from web.config file. It shows you how you can set several host names for the same Sitecore site in web.config file.
NOTE: This approach is supposed to have “website” site in your web.config file.
Using this idea you can set not only host names but the whole site configuration for the same Sitecore site. In that case you will be able to share cache and other resources among several sites.
Below are the steps how to apply this approach:
1) Create custom SiteResolver and set add it in web.config file just after the native SiteResolver processor, as shown below:
<httprequestbegin>
………………
<processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />
<processor type="SiteMapper.Pipelines.HttpRequest. SimilarSitesResolver, SiteMapper" />
………………
</httprequestbegin>
2) Create special config file (similar.sites.config) to map your sites with the following structure:
<sites>
<site mode="on" name="www.mysite" hostname="www.mysite.dk" language="da-DK" />
<site mode="on" name="www.mysite" hostname="www.mysite.uk" language="en-GB" />
<site mode="on" name="www.mysite" hostname="www.mysite.com" language="en" />
</sites>
As you can see all three sites have the same “name”. This name determine which site from web.config file should be used when you request any of these sites.
Example of web.config file:
<!-- ***** www.mysite group ***** -->
<site mode="on" name="www.mysite" hostname=" www.mysite.com" language="en" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/www.mysite/home" database="web" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10MB" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" />
<!-- “website” is compulsory for this solution -->
<site name="website" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/flugger/home" database="master" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10MB" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" />
NOTE: each Sitecore site in web.config file must have hostName attribute. Otherwise Sitecore will classify this site as a default website and you won’t get required results.
Here is Sitecore package.
Using this approach you should have custom SiteResolver processor and special config file where you can map your sites to the same instance of Sitecore site from web.config file. It shows you how you can set several host names for the same Sitecore site in web.config file.
NOTE: This approach is supposed to have “website” site in your web.config file.
Using this idea you can set not only host names but the whole site configuration for the same Sitecore site. In that case you will be able to share cache and other resources among several sites.
Below are the steps how to apply this approach:
1) Create custom SiteResolver and set add it in web.config file just after the native SiteResolver processor, as shown below:
<httprequestbegin>
………………
<processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />
<processor type="SiteMapper.Pipelines.HttpRequest. SimilarSitesResolver, SiteMapper" />
………………
</httprequestbegin>
2) Create special config file (similar.sites.config) to map your sites with the following structure:
<sites>
<site mode="on" name="www.mysite" hostname="www.mysite.dk" language="da-DK" />
<site mode="on" name="www.mysite" hostname="www.mysite.uk" language="en-GB" />
<site mode="on" name="www.mysite" hostname="www.mysite.com" language="en" />
</sites>
As you can see all three sites have the same “name”. This name determine which site from web.config file should be used when you request any of these sites.
Example of web.config file:
<!-- ***** www.mysite group ***** -->
<site mode="on" name="www.mysite" hostname=" www.mysite.com" language="en" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/www.mysite/home" database="web" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10MB" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" />
<!-- “website” is compulsory for this solution -->
<site name="website" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/flugger/home" database="master" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10MB" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" />
NOTE: each Sitecore site in web.config file must have hostName attribute. Otherwise Sitecore will classify this site as a default website and you won’t get required results.
Here is Sitecore package.
Monday, March 31, 2008
Convert unversioned media to versioned
This tool is intended to make a work with media be smoothly. By default Sitecore uploads media as unversioned data. In order to have different media data for different languages we need to upload media as versioned. Otherwise you won't be able to have different data for the same media item. Even if you change unversioned template to versioned.
After installing the package a "Make versioned" button will be available on Media tab.

You can convert media item as well as the whole media folder.
You can download sitecore package from here.
After installing the package a "Make versioned" button will be available on Media tab.
You can convert media item as well as the whole media folder.
You can download sitecore package from here.
Monday, March 3, 2008
Cross Database TreeList Field
Sometimes we would like to have an opportunity to get data from another database in sitecore field. Since we already have source code of TreeList field on SDN, I decided to adjust it a little bit to have such opportunity.
To allow cross db usage I had to add one parameter to the source query of TreeList field.
It's SourceDatabaseName parameter.
Here is example how to get users from security database in TreeList field.
Here is the way it looks:

To get rid of broken links in this field I had to MultilistCrossDbField which is intended to validate links correctly in LinkDatabase. So, don't forget to add the line below into /App_Config/FieldTypes.config file:
<configuration>
............
<!-- Custom fields -->
<fieldtype name="tree list cross db" type="Custom.Data.Fields.MultilistCrossDbField,TreeListCrossDB">
</fieldtype>
</configuration>
I added support for "query:" definition into this field. Now you can use either "/sitecore/content" or "query:/sitecore/content/*" as a data source for the field.
Here is Sitecore Package for the field.
Here is source code.
To allow cross db usage I had to add one parameter to the source query of TreeList field.
It's SourceDatabaseName parameter.
Here is example how to get users from security database in TreeList field.
DataSource=/sitecore/users&SourceDatabaseName=security
Here is the way it looks:
To get rid of broken links in this field I had to MultilistCrossDbField which is intended to validate links correctly in LinkDatabase. So, don't forget to add the line below into /App_Config/FieldTypes.config file:
<configuration>
............
<!-- Custom fields -->
<fieldtype name="tree list cross db" type="Custom.Data.Fields.MultilistCrossDbField,TreeListCrossDB">
</fieldtype>
</configuration>
I added support for "query:" definition into this field. Now you can use either "/sitecore/content" or "query:/sitecore/content/*" as a data source for the field.
Here is Sitecore Package for the field.
Here is source code.
Friday, February 29, 2008
Go To Item tool
Sometimes you have item ID or somebody provides you with pretty long item path and you want to navigate to the item as fast as you can. Of course you can use DBBrowser tool but it's not very convenient switching between several browser windows, isn't it.
So, I created a "Go To Item" tool and I like to share it with Sitecore lovers :).
To get it working you have to install the attached Sitecore package on your Sitecore.
After installation you can see the "Go To Item" button on Developer tab.

After clicking the button you get dialog window where you should input item path/ID. Since /sitecore item is a root of any sitecore trees you can avoid it in item path.

Here is Sitecore package (follow readme instruction during installation).
Here is GoToItem sources.
So, I created a "Go To Item" tool and I like to share it with Sitecore lovers :).
To get it working you have to install the attached Sitecore package on your Sitecore.
After installation you can see the "Go To Item" button on Developer tab.
After clicking the button you get dialog window where you should input item path/ID. Since /sitecore item is a root of any sitecore trees you can avoid it in item path.
Here is Sitecore package (follow readme instruction during installation).
Here is GoToItem sources.
Subscribe to:
Posts (Atom)