Posted by tejaspmehta on March 2, 2010 at 12:12pm
Hello,
I have setup Multisite on my server. Now i have set my master site with one theme and i do not want my sub-site / child site that they can see this theme. Is it possible to hide particular module or theme which is set in all folders.
My directory structure is like following.
sites/
all/
themes/ (all themes are set in this folder)
modules/ (all modules are set in this folder)
site1.com/
settings.php
site2.com/
settings.php
If it is possible than please let it know.
Thank you.
Tejas Mehta.
Comments
Yes and no
If you want your main site to have it's own private theme then you can't have that theme in the sites/all folder, or in your case sites/themes (is that even possible? - anyway)
if site1 is your master site then create a themes folder in it's site directory and place your private theme inside there
e.g. sites/site1/themes/my_awesome_theme
site2 won't be able to see it
I would recomend you place common themes and modules in the sites/all folder.
Hope this helps
INSTALL.txt file
cclafferty is correct. Everything you place under sites/all folder will be share by ALL your sites.
To hide something follow the steps into the INSTALL.txt file. Below is an extract of from that file. The part you're interested in is at the end. There's an example that should help clarify.
Read more at http://groups.drupal.org/node/54608#comment-165113
---
How to contribute to Drupal.
D'Oh
Deleting my double post. I hit the SAVE button twice.
---
How to contribute to Drupal.
Hello cclafferty, Thank you
Hello cclafferty,
Thank you for your reply but can you explain me how can i set master site's sites/all/theme/ private ? I know for site1 it will work (sites/site1/theme). But my problem is i need to do it for master site only.
Thank you
Tejas Mehta
You cannot, unless...
Sorry, but everything in the sites/all folder is going to be shared across all your sites.
If you wish to still have your master site independent from your other sites you should not be using the sites/default directory at all.
Now using this method, you may run into a few problems if you are hard linking to files previously within sites/default but other than that it should run as desired.
Rename your "sites/default" to sites/[domain-name-of-master-site]
for example: rename sites/default to sites/master.com
After this, create a two new folders witin sites/master.com, a themes folder and a modules folder.
Drop your site specific themes & modules in here just like you would with any child site.
You may have to clear your caches and/or re-choose your theme. You should also ensure your master's file system (admin/settings/file-system) is correct.
What you have to realise is there is no such thing as a master - child relationship in drupal and in fact all sites in a multisite are equal. You are confusing the default folder as being a master when it is actually just a site which runs when no domain has been given/matches one of your multi site folders. I hope this makes sense.
I know this may sound daunting but its the only way I know how to do what your after.
Post back with how you get on.
Hello cclafferty, i think
Hello cclafferty,
i think this method will surely work. i have tried on my one website to make it sites/default to sites/sitename.com and it worked. instead of default we can write sitename.com which is written in settings.php.
Thank you for your help.
Tejas Mehta