0

I have an MSM setup where the primary site is the "main" site in EE and the subdomains are all sub-sites in EE. I have built out the primary navigation in the main site, but I don't know a good way to keep the primary domain as the first segment when needed.

So in all of my sub-domain sites, I use the following:

{embed="main_site:includes/.nav_main"}

And in that .nav_main, I have this:

<!-- HOME -->
    <li><a href="{site_url}">Home</a></li>
<!-- HOME -->

That reads different on each sub-domain because they are all a "site". Some of the sub-domains will have their own navigational elements so {site_url} works fine for them when/if I needed to use it.

It would be nice to be able to do something like:

{site_url:site_name} or {msm:site_name:site_url}

Is there a plug-in, add-on, or native functionality I am missing?

1 Answer 1

1

Your best bet is to hold this URL via a global variable defined inside of your config file (as standard user-defined global variables will be scoped to each site).

Or to get fancier, use Low Variables, which will may help you elsewhere in your site build as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.