Retired Documentation:  You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.

Multiple Site Manager Variables and Parameter

Parameter

The Multiple Site Manager enables the use of the site="" parameter installation wide. This parameter will be used when you want to pull the content of one Site into another Site's templates. The value of the parameter is always the Site's Short Name.

The site="" parameter is available to the following:

When you use the site="" parameter it will exclude all other Sites. If the site="" parameter is not specified then the current site is used.

Embedding Templates from Another Site

To embed a template from another Site, simply prefix the template group and template specified with the short name of the site you wish to pull the template from as follows:

{embed="site_short_name:template_group/template"}

So if the Site's Short Name is "siteA" and you want to embed the "global/footer" template:

{embed="siteA:global/footer"}

Specifying Multiple Sites (prepare for a head trip)

Note:  Specifying multiple Sites does not work with the {embed=""} tag.

When using the site="" parameter in the Weblog, Comment, Statistics, and RSS modules you can specify multiple Sites like so:

site="siteA|siteB|siteC"

Like other ExpressionEngine parameters, you can also use 'not' to specify what Sites not to show:

site="not SiteD"

Let's pause a moment to remember that each Site is independent of other Sites. This means you can have Weblogs that have the same short_name. The implications of this are far reaching and provide a lot of flexibility but will also require careful consideration.

For example, let's say you have SiteA, SiteB, and SiteC. Each of these Sites has a "news" weblog which uses the Weblog Short Name of "news". The following code would display the "news" weblogs from all the Sites:

{exp:weblog:entries weblog="news" site="siteA|siteB|siteC"}

Parameters

Within the weblog entries tag, it is possible to output a list of entries from multiple Sites while ordering by Site and Custom Field. Read more about the Multiple Site Manager and orderby=.

Variables

The following Global Variables are available with the Multiple Site Manager:

Next:  Manage existing Sites

Top of Page