English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Environment variables
#2486
Environment variables 14 Years, 6 Months ago Karma: 0
Hi

is there a way to use the variables like {rel_site_dir} in a module or component of a slave site?

I'm using the Random Picture module and I want to separate the pictures of each slave site, but I don't want to do that manually!

Or... another option would be coding... is there a variable in code that I can get the path to the current slave site?

Thanks in advance

Bruno
blpagno
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2488
Re:Environment variables 14 Years, 6 Months ago Karma: 54
You have a define that is set each time you have a slave site that is active.

if ( defined( 'MULTISITES_ID' ) ) {
// this is the slave site identifier
}
else {
// this is the master website
}

So you can use the "MULTISTIES_ID" to compute a name or a file, picture or whatever.
This is the internal define that is used by JMS to suffix some configuration file to make it unique.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
Last Edit: 2009/11/07 00:23 By edwin2win.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla