<p>It's not ideal, but you can use one template folder for each group and then create symbolic links for all the language sites.</p>

CC BY-SA 4.0
2019-04-03T10:37:03.013Z
2019-04-03T10:37:03.013Z
gioppe
<p>We are building a multi-site set up in Craft. We will have a lot of "microsites" for different locations.</p>

<p>I have a site group called "Microsites" and I would like the home page for each of these sites to load a template inside /templates/microsites/index.twig</p>

<p>I don't want to create individual folders in the template folder for each site.</p>

<p>Is this possible?</p>

<p>Edit: I'll provide overview of the site setup</p>

<p>So I will have over 100 different sites on here representing a location. We have a Locations channel on the main site that will hold the data we will query in the Microsite template.</p>

<p>Each microsite will have its own base URL like so:</p>

<pre><code>@web/san-francisco
</code></pre>

<p>so whenever that page is loaded, I want it to go into /templates/microsite/_index.twig </p>

<p>Every single microsite home page will use that same template and have the data be loaded dynamically.</p>

<p>The reason we can't just use Channel entries is because we will need localized blogs for them.</p>

<p>Maybe I'm going about this all wrong?</p>

CC BY-SA 4.0
2019-03-20T20:54:21.563Z
Why don't you use the very same template for all of them and include another one based on the site group? `include '.../.../' ~ entry.getSite().getGroup().name ~ '/index.twig' `
Robin Schambach
CC BY-SA 4.0
2019-03-26T15:46:45.267Z
Hi thanks for this. I'm strangely getting `Variable "entry" does not exist.` on all but one site in my site group. Even the main primary site does that
millman2394
CC BY-SA 4.0
2019-03-26T16:11:12.913Z
The code above only works for entry routes so if you don't route via entry but via custom routes you'll need to add a site indecator by yourself. It was more an example how it could be done, if you route via category or something else you need to adept it
Robin Schambach
<multi-site>
Template for Site Group rather than site handle
# Template for Site Group rather than site handle

(Asked by: username_0 on 2019-03-20)

We are building a multi-site set up in Craft. We will have a lot of "microsites" for different locations.
I have a site group called "Microsites" and I would like the home page for each of these sites to load a template inside /templates/microsites/index.twig
I don't want to create individual folders in the template folder for each site.
Is this possible?
Edit: I'll provide overview of the site setup
So I will have over 100 different sites on here representing a location. We have a Locations channel on the main site that will hold the data we will query in the Microsite template.
Each microsite will have its own base URL like so:
@web/san-francisco

so whenever that page is loaded, I want it to go into /templates/microsite/_index.twig 
Every single microsite home page will use that same template and have the data be loaded dynamically.
The reason we can't just use Channel entries is because we will need localized blogs for them.
Maybe I'm going about this all wrong?

**Tags:** multi-site

> **Comments:**
> **username_1**: Why don't you use the very same template for all of them and include another one based on the site group? `include '.../.../' ~ entry.getSite().getGroup().name ~ '/index.twig' `  
> **username_0**: Hi thanks for this. I'm strangely getting `Variable "entry" does not exist.` on all but one site in my site group. Even the main primary site does that  
> **username_1**: The code above only works for entry routes so if you don't route via entry but via custom routes you'll need to add a site indecator by yourself. It was more an example how it could be done, if you route via category or something else you need to adept it  

---

## 1 answers

### Answer by username_2 on 2019-04-03. Score: 1

It's not ideal, but you can use one template folder for each group and then create symbolic links for all the language sites.


---

