This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
If you have multiple sites and you want to identify the number of the site or folder through code, how to proceed?
I don't know the technique off the top of my head, but as with most everything in mojoPortal, the code itself is the best teacher. Take a look at SiteList.aspx.cs (code behind for the /Admin/SiteList.aspx page).
For code that runs in the context of a web page request you can do:
SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();
then you can use
siteSettings.SiteID to get the id of the current site.
Ottimo grazie!
Funziona perfettamente.