I am having problem understanding the 'web site' concept in EPiServer Community (edit-mode -> 'community'-tab -> 'System settings' -> 'Web sites'). What is the purpose of it and how are they used?
When I try to read the SiteHandler.CurrentSite I get null as a return value even though a web site named 'Default' is available. Why is that?
Web sites are just a way of partitioning content, no matter what type of content (blogs, forum topics, whatever). All handlers have method overloads for their CRUD operations which accept a reference to a site. I guess the most common is to partition by content language, but the concept is not limited to that.
The null value returned is equal to the global site, which is the parent node in the configuration.
Hi can you further explain the concept of global and default site in community
The default site is like any site, it is just named "Default". So whether content is tied to the default site or to the global site is dependent on whether they are assigned to the ISite instance named "Default" or not assigned at all (site is null).
Sites have been removed from Community 4.0 and above. Instead Categories can be used to accomplish the same type of partitioning.
Thankyou very much for your quick reply, it helped me a lot.