Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8901935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:29:09+00:00 2026-06-15T01:29:09+00:00

I’m sure this question does not deserve it’s own topic but I’ve failed to

  • 0

I’m sure this question does not deserve it’s own topic but I’ve failed to find a satisfying answer on the forums and Stack Overflow.

I have three templates. I’ll try to be clear and simple about what I’m trying to do.

Page

{exp:channel:entries channel="page" dynamic="yes"}
    {!-- 'pages_module' is a matrix field --}
    {page_modules}
        {!-- The field 'module' is returning the entry_id from SP Table Select --}
        {embed="module/index" id="{module:value}"}
    {/page_modules}
{/exp:channel:entries}

Module – Index

{exp:channel:entries channel="module" dynamic="no" entry_id="{embed:id}" site="main_site"}
    {if module_type == "building"}
        {embed="module/building" id="{building_id}"}
    {/if}
    {!-- Other module type checking here... --}
    {!-- Note this following line --}
{entry_id} - {embed:id}
{/exp:channel:entries}

Module – Building

{exp:channel:entries channel="building" dynamic="no" entry_id="{embed:id}" site="main_site"}
    <h1>{title}</h1>
    <p>{building_description}</p>
{/exp:channel:entries}

So basically, in this setup you can attach “modules” to pages entries. In this particular case, I’m trying to look if any {module_id} was set on the page. If so, pass {module_id} to the main module template, which will get the module entry, compare the {module_type} and send {building_id} to a third template. Then the building information is fetched and displayed.

In the module template, where I wrote a note, {entry_id} and {embed:id} does not match. {entry_id} equals the ID of the first page entry that was fetched dynamically. I assume this is happening because since it’s embedded templates and not snippets, it results in three nested {exp:channel:entries} tags. But then again, I can’t pass IDs to a snippet, can I?

Also worth noting that I’m using MSM, and since I have 8 sites running on it, I wanted “modules” to be, well, modular and all reside under the “main site” for convenient maintenance.

I hope someone can clarify this and/or correct me if I’m wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:29:11+00:00Added an answer on June 15, 2026 at 1:29 am

    As cited in the documentation:

    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"}

    But!

    Specifying Multiple Sites (prepare for a head trip)

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

    Then I thought I could play around this limitation with PHP but it seems even the basic…

    $output = $this->EE->TMPL->parse_variables('{exp:channel:entries channel="module" dynamic="no" site="main_site"}{entry_id}{/exp:channel:entries}', array());
    

    …wouldn’t return the expected values. It seems there is no way to embed a template that itself fetches data from a different site. This is disappointing since getting data from other since while not repeating channels/templates is, to me, the exact reason why you want to use the multi-site manager…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure this question is asked a lot but I cannot find an answer
I have seen this question answered here, but unfortunately the answer does not work.
I'm sure this question has a simple enough answer, but I can't seem to
I'm not sure this question is appropriate here but I hope I could get
I am not sure if this question is already answered. But here it goes:
I'm not sure if this question fits properly, but I'm wondering in tile-based games,
I'm not sure whether this question belongs on StackOverflow or SuperUser, but here goes
I'm not sure if this question has been asked before but are there any
I'm not sure if this question has been asked before, but I can't seem
Not sure how noob or advanced this question is, but I've been having kind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.