We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Module development and Multiple Site Manager (MSM)

Development and Programming

Paul Bell's avatar
Paul Bell
103 posts
17 years ago
Paul Bell's avatar Paul Bell

What advice have you got for developers of websites about using the Multiple Site Manager? In particular, how can you tell which site someone is looking at? I’m building a module which should only work for one site, so I want to disable it when someone is viewing the other site?

Alternatively, some advice on how to build a module which can be used on both sites, with separate preferences and data for each site.

       
ExpressionEngineer's avatar
ExpressionEngineer
148 posts
17 years ago
ExpressionEngineer's avatar ExpressionEngineer

Hey Paul, I assume you know your way around the EE internals, so I’ll keep this brief. You use $PREFS->ini(‘site_id’) to find out what site your module is called from. You might want to add a site_id column to your custom module table(s) to keep data separated for each site. For compatibility, alot of tables in EE uses site_id to separate data, even if the MSM is not installed.

Good luck!

edit: spelling/clarification.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.