Sites, routes, and navigation
Deployment selection
| SiteMode | Route registration | Menu file under CODE.com/wwwroot |
|---|---|---|
| Magazine | Standard | MagazineMenu.json |
| Staffing | Staffing | StaffingMenu.json |
| Group | Group | GroupMenu.json |
| Events | Events | EventsMenu.json |
| Training, Consulting, Blogs | Standard fallback | MagazineMenu.json fallback |
An enum member does not establish a complete deployment. Inspect branding, route defaults, service filtering, contact details, and cross-site links when adding one. SiteMode and StyleMode are independent; restart to change either.
Route ordering and compatibility
RouteHelper.RegisterRoutes selects the site route set, adds common business-card (Hello/{id}), sitemap, and account aliases, then a fallback that redirects to /Error. Inspect attribute routes as well as conventional routes. A missing menu entry does not disable an endpoint.
Put specific routes before conflicting general patterns and retain existing names, casing, aliases, parameters, and defaults. Standard article routes include article/{id?}, figure/download endpoints, and article/{id}/{ignore} for title-bearing URLs. Blog routing distinguishes Blog/{slug} from Blog/{blogSlug}/{postSlug}. Event route sets retain multiple brand aliases and event/ics/{id} before event/{id}. Preserve these contracts when changing titles or display labels.
Standard and Group route sets call RegisterConsultingServiceRoutes. This registers Service/{id} and then custom backend slugs before the general default route. Slugs are loaded at startup through ConsultingServicesHelper.GetServicesWithSlugsRaw, which makes a direct HTTP request rather than ServiceClient.Call. The outer fetch is not covered by the per-route registration catch. A backend slug change requires a restart to update registered routes. Clearing menu data alone does not rebuild routes.
JSON navigation
CodeHelper.GetMenuItems loads cached JSON definitions and expands dynamic entries. The same definitions support desktop/mobile navigation and the footer directory. Magazine now uses the JSON renderer too; older descriptions of a hardcoded magazine menu are historical.
| Field | Meaning |
|---|---|
display |
Navigation label |
controller, action, id |
MVC route values for generated links |
url |
Explicit local or external URL |
menuItems |
Child links; do not assume unlimited dropdown depth |
specialId |
Dynamic placeholder such as codegroup or consultingservices |
showInMenu, showInSiteMap |
Independent visibility, both default true |
siteMapOrder |
Directory ordering independent of header order |
openInNewTab |
External-link target behavior |
footer |
Compact-footer group/order/label metadata |
Use one deliberate link form. Inspect GetMenuItemUrl and rendering before combining explicit URLs with route fields. Selection depends on controller/action metadata and existing area aliases; an explicit URL alone does not give equivalent selection behavior.
codegroup expands cross-site links while omitting the matching current site. Magazine's consultingservices expands service links between configured home/contact links. Dynamic snapshots protect cached JSON definitions from duplicate insertion. Service ordering/filtering comes from the backend and ConsultingServicesHelper, not just the JSON file.
Magazine keeps Framework and VFP Conversion in the directory only and Home/Blogs in the header only. Preserve these differences and external targets. JSON definitions are cached in memory; restart when verifying file edits.
Adding a site or destination
For a destination, identify the controller/action, register the route in every intended mode, then add menu metadata where appropriate. For a deployment, extend the enum, deliberate route selection, JSON menu selection, and relevant branding/contact switches. Use the site-configuration skill and verify its guidance against current source. Check generated URLs, selection, mobile expansion, directory order, and footer behavior in affected modes.