Build the default footer from the taxonomy - #218
Merged
Conversation
The footer's default was a hand-written list of every section and subsection, which meant every taxonomy change had to be made twice. It had already drifted: it still listed Cooking, Books and Listicles under Entertainment, and knew nothing about Food or TV. The shape stays hand-written -- Columns stacked under Opinion, Special Editions under Comics & Puzzles, six columns -- because that is a layout decision no data answers. Only the links inside are generated. One layer deep, matching the section strip: a section's heading plus its direct visible subsections. The tree is three levels now, so recursing would print Beer Reviews, Wine Reviews and Restaurant Reviews under A&E and grow without bound. is_visible drives both the strip and the footer, so hiding a subsection in the sections screen now removes it from both in one action. Two blocks stay literal because they are not taxonomy. The About column is site furniture. The Special Editions block reads like taxonomy but is not: three of its four links deliberately point away from their own page -- The Rectangle is an external site, Welcome Week a search URL, 100 Year Anniversary a bespoke page -- and Graduation is a section that appears in no other column. Cached with the cms_settings TTL, since the footer renders on every page and the stored setting is absent by default; without it every request would run a taxonomy query, which is the load that queued in front of the database on 2026-08-06. A taxonomy write drops it. An unreadable or empty taxonomy falls back to the old static columns rather than rendering an empty nav. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The footer's default was a hand-written list of every section and subsection, so every taxonomy change had to be made twice. It had already drifted — it still listed Cooking, Books and Listicles under Entertainment, and knew nothing about Food or TV.
Prod has no
footer_menurow, so it is serving that default: this change reaches the live site.What is generated and what is not
The shape stays hand-written. Columns stacked under Opinion, Special Editions under Comics & Puzzles, six columns total. That is a layout decision no data answers, and a rule like "one column per section" would widen the footer to eight the moment somebody adds a section. Only the links inside are generated.
One layer deep, matching the section strip: a heading plus its direct visible subsections. The tree is three levels now, so recursing would print Beer Reviews, Wine Reviews and Restaurant Reviews under A&E and grow without bound.
is_visibledrives both. Hiding a subsection in the sections screen now removes it from the strip and the footer in one action — which is the part that makes this stop being manual.Two blocks stay literal, because they are not taxonomy. The About column is site furniture. The Special Editions block reads like taxonomy but is not: three of its four links deliberately point away from their own page (The Rectangle is an external site, Welcome Week a search URL, 100 Year Anniversary a bespoke page), and Graduation is a section appearing in no other column. Generating that block would quietly redirect four working links, so a test pins them.
What readers will see
Rendered against a snapshot of the live taxonomy, the only column that changes is Entertainment, plus more complete lists elsewhere:
News, Sports, Opinion, Columns and Comics & Puzzles gain the subsections the hand-written list never picked up (City, National, World, NIL, Squash, Lifestyle, Jack of All Takes, Comics, Puzzles, Satire, …). The footer gets longer; that is it agreeing with the taxonomy.
Safety
Cached with the
cms_settingsTTL — the footer renders on every page and the stored setting is absent by default, so without it every request would run a taxonomy query, the shape of load that queued in front of the database on 2026-08-06. A taxonomy write drops the cache. An unreadable or empty taxonomy falls back to the old static columns rather than rendering an empty nav.A stored menu still wins: this is the default, not an override of anything an editor saved.
Full Go suite green against MariaDB.
🤖 Generated with Claude Code