Hello,
You will need to execute custom SQL query and retrieve the number of rows with the appopriate
NodeID from the
View_CMS_Tree_Joined table.
So, you can use following code:
object[,] parameters = new object[1, 3];
int NodeID = 100;
parameters[0, 0] = "@NodeID";
parameters[0, 1] = NodeID;
UserInfo ui = UserInfoProvider.GetUserInfo("administrator");
CMS.TreeEngine.TreeProvider tree = new CMS.TreeEngine.TreeProvider(ui);
CMS.DataEngine.GeneralConnection connection = tree.Connection;
int numberOfCultures = CMS.GlobalHelper.ValidationHelper.GetInteger(connection.ExecuteScalar("SELECT Count(DocumentCulture) FROM View_CMS_Tree_Joined WHERE NodeID = @NodeID", parameters, QueryTypeEnum.SQLQuery, false), 0);
I hope this will help you.
Best regards,
Michal Legen