Hey guys,
Hoping someone can help me get to the bottom of this one. In one of our addons, we have a need to identify what the index page in EE has been renamed to. We have always used the following to get that information:
$this->EE->config->item(‘index_page’)
However, one of the users of our addon has an MSM installation, which has a single EE install, with two separate index.php files in the root directory. The user has renamed them to:
index1.php and index2.php
The issue I having, is that when I access the variable above, I always get the latter, no matter which MSM instance I am in. Is there a better way to access the site specific index.php name?
Thanks in advance for the help.
Hey Steven,
Yes - but I don’t think that would fix the problem, because there is still only one config file which would output what the name of the index.php file has been changed to. So even if the user had done this:
/renamedindex1.php /subdirectory/renamedindex2.php
There is still only that one config variable to access. Unless maybe somehow the subdirectory fixes that? But I’m not quite sure how that would work.
I should make a note here that this is not my install - but rather an install for a user of one of our addons. I just want to make sure we have every eventuality accounted for with different kind of MSM installs. I’ve never set up an MSM in this way before.
MW
If it doesn’t return the correct config value for the site you’re currently on sounds like an EE bug to me..?
Anyway, I’m sure you can find the value in the database - probably in the exp_sites table. It’s difficult to tell just by looking at it though since it’s serialzied and then base64 encoded. Yay.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.