Multiple Themes In One

Using Concrete 9

I am new to developing in Concrete and have a theme question. I am developing a site for local county government. Along with that site, there are several sites with their own domain name (using multi-site). Each site has a slightly different look to it, but share a common dropdown link in the navigation bar. That dropdown contains a list of all county departments and the link to get to the appropriate page.

My two questions:

  1. Do I have to create a separate theme for each site, or can I have multiple layouts in the same theme. The only things different are a slightly different header, different css, and home page look.

  2. The dropdown menu in my navigation is shared on all pages on all different sites (across multi site domains). How do I include the html for that dropdown so all sites can import it, rather than me having to edit each theme (if I have to create a theme for each site)

Thanks for any input!

LEe

1.) In your shoes, I would make a sitewide attribute on each site and in the theme files just reference the value of that attribute to pull in different CSS / JS / etc. based on what site you’re on.

2.) In the header element for the theme, you could probably just code in that drop down, really just the same as you would normally for a theme on a single site.

1 Like

When I have needed to do similar, most was done in CSS.
In the header of the theme, the php checks the path or domain and sets a CSS class on the <html> or <body> element. (You can see the core does similar for edit mode and for the page theme class)

In the theme CSS, that class can be used to gate a colour scheme and other minor differences for a specific site or region of a site. CSS variables can be very handy for propagating such a global style change throughout a theme CSS without needing to redefine colours in many places.

An embellishment is to also have a page attribute that the header php checks to override the path/domain derived CSS class.

1 Like

Thanks Evan. I may be trying to make this harder than it is. I’m new to Concrete5 coming from a ModX background. Be patient. I’m learning!

Thank you for the input. I may try that.