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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.