12 March, 2012

How to access Context Database in Sitecore v6.5 - 1

Sitecore has 3 databases: Core, Master and Web. Core has Sitecore Components; Master has all versioned files and unversioned content; Web has only latest (published) content.
Current Client
When using Sitecore Client or any CMS client
Core Database
When using Page Editor
Master Database
When browsing Published Site
Web Database

Sitecore.Data.Database context = Sitecore.Context.Database;

Note: Add Sitecore.Kernel.dll reference to project.

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }