Thank you very much, Robin and Clive.
Note: I think there are better answers than what I have written here, such as this but they didn't appear to me after writing this.
In case it might benefit anyone, it's clear there are many ways to do this. My setup does not use Craft's "multi-site" capabilities, but has three urls pointing to the same index.php. It functions more or less as follows:
Folder Structure
craft/config/sitedata.php
craft/templates/_genericPageTemplate.html
/mifc/_navigation.html
/local.css
/migr/_navigation.html
/local.css
/miwy/_navigation.html
/local.css
public_html/index.php
Main Page Template
Now starts with:
{% set domain = craft.app.request.ServerName %}
{% set siteUrl = '//' ~ domain ~ '/' %}
{% set env = getenv('ENVIRONMENT') %}
{% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}
{% set siteData = sitesData[domain] %}
{% set categoriesToDisplay = siteData.nativeCategoryIds|merge(siteData.sharedCategoryIds) %}
and later brings in the css and navigation depending on site:
<link rel='stylesheet' id='localCss' href='/{{siteData.handle}}/local.css' type='text/css' media='all' />
...
{% include siteData.handle~'/_navigation.html' %}
Config File
In {% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}
the page template references craft/config/sitedata.php
which contains stuff specific to each site, both for production and development:
<?php
/**
* Return an array indexed by locale code
*/
return [
'production' => [
'site1.org' => [
'live' => true,
'handle' => 'mifc',
'nameInMenus' => 'Fort Collins',
'siteTitleSuffix' => 'Fort Collins Meditation & Modern Buddhism',
'url' => 'site1.org',
'titleMainBig' => 'Meditation & Buddhism',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
'topNativeCategoryIds' => [194,195,220],
'nativeCategoryIds' => [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
'topSharedCategoryIds' => [13,60],
'sharedCategoryIds' => [13,60],
],
'site2.org' => [
'live' => true,
'handle' => 'migr',
'nameInMenus' => 'Greeley',
'url' => 'site2.org',
'siteTitleSuffix' => 'Greeley Meditation & Modern Buddhism',
'titleMainBig' => 'Meditation & Buddhism in Greeley',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Greeley',
'topNativeCategoryIds' => [197],
'nativeCategoryIds' => [197,3112,58,61,2940,59,62,60],
'topSharedCategoryIds' => [198,67,13],
'sharedCategoryIds' => [198,10,11,14,67,13],
'eventsCategoryIds' => [60,198,10,11,14,67,13],
],
'site3.org' => [
'live' => true,
'handle' => 'miwy',
'nameInMenus' => 'Wyoming',
'url' => 'site3.org',
'siteTitleSuffix' => 'Wyoming Meditation & Modern Buddhism',
'titleMainBig' => 'Meditation & Buddhism in Wyoming',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Wyoming',
'topNativeCategoryIds' => [3151],
'nativeCategoryIds' => [3151,2969,65,64,68,69,72],
'topSharedCategoryIds' => [198,60,13],
'sharedCategoryIds' => [198,10,11,14,60,13],
'eventsCategoryIds' => [60,198,10,11,14,67,13],
],
],
'dev' => [
'f.dev' => [
'live' => true,
'handle' => 'mifc',
'nameInMenus' => 'Fort Collins',
'siteTitleSuffix' => 'Fort Collins Meditation & Modern Buddhism',
'url' => 'f.dev',
'titleMainBig' => 'Meditation & Buddhism',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
'topNativeCategoryIds' => [194,195,220],
'nativeCategoryIds' => [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
'topSharedCategoryIds' => [13,60],
'sharedCategoryIds' => [13,60],
],
'g.dev' => [
'live' => true,
'handle' => 'migr',
'nameInMenus' => 'Greeley',
'url' => 'g.dev',
'siteTitleSuffix' => 'Greeley Meditation & Modern Buddhism',
'titleMainBig' => 'Meditation & Buddhism in Greeley',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Greeley',
'topNativeCategoryIds' => [197],
'nativeCategoryIds' => [197,3112,58,61,2940,59,62,60],
'topSharedCategoryIds' => [198,67,13],
'sharedCategoryIds' => [198,10,11,14,67,13],
'eventsCategoryIds' => [60,198,10,11,14,67,13],
],
'w.dev' => [
'live' => true,
'handle' => 'miwy',
'nameInMenus' => 'Wyoming',
'url' => 'w.dev',
'siteTitleSuffix' => 'Wyoming Meditation & Modern Buddhism',
'titleMainBig' => 'Meditation & Buddhism in Wyoming',
'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Wyoming',
'topNativeCategoryIds' => [3151],
'nativeCategoryIds' => [3151,2969,65,64,68,69,72],
'topSharedCategoryIds' => [198,60,13],
'sharedCategoryIds' => [198,10,11,14,60,13],
'eventsCategoryIds' => [60,198,10,11,14,67,13],
],
]
];
Feel free to point out any mistakes, etc, in this way of doing things.
getUrl()
to link to those entries{% set domain = craft.request.getServerName() %} {% if domain starts with 'london' %}{% include '_incs/_londonNav' %}
They'll be similar for Craft 3.