I set up a project using the steps here so I could use the Kentico API in an external project.
Everything works well, but I don't know how to get the proper site ID. I'm using the code below:
activity.ActivitySiteID = SiteContext.CurrentSiteID;
That always returns the global site ID. How do I configure the project to know which specific site to use?
You need to use SiteInfoProvider
SiteInfo si = SiteInfoProvider.GetSiteInfo("SiteName"); if (si!= null) { siteID = si.SiteID; }
Thanks!
Please, sign in to be able to submit a new answer.