SiteCriterion for global site

Vote:
 
How do I write a SiteCriterion to get entities only from the global/null site (not including specific sites)?
#26769
Dec 19, 2008 9:21
Vote:
 

Hi Magnus,

It's not directly built into the criterion, but it is possible to achieve this by subclassing SiteCriterion and overriding its GetQuery(string propertyName) method. I.e:

public override string GetQuery(string propertyName)
{
  return propertyName + " IS NULL";
}

#27244
Jan 21, 2009 21:53
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.