I want to make a page which has one top part, a row of two or more horizontal tabs beneath it, and alternative bottom parts which appear beneath that and can be selected by clicking on the tabs.
For example, imagine a page that someone might write about their cat. The top half is a photo of the cat and some text. At the moment, it's static, but I might later add a Twitter feed. Under it are tabs labelled "Poem", "Photo", and "Blog". The bottom half that gets selected when the user clicks on "Poem" is a poem, static HTML. That which gets selected when clicking on "Photos" is also static HTML, another image. And that which gets selected when clicking on "Blog" is dynamic: a blogroll implemented as a View.
Just to make sure that’s unambiguous, there are pictures of the top half and the three bottom halves at http: //www.j-paine.org/dobbs/kitty_page_top_264.gif, http: //www.j-paine.org/dobbs/kitty_page_poem_257.gif, http: //www.j-paine.org/dobbs/kitty_page_photo_296.gif, and http: //www.j-paine.org/dobbs/kitty_page_blog_279.gif. Apologies for the deformed HTML, but this thing only lets me post two links.
I’ve found quite a lot of methods that on first sight, may do what I want. These include the modules Quick Tabs and Node Tab, as well as the trick with views menus that Ron Golan describes in "Views Menu Tabs Quick Guide" (see https://www.urbaninsight.com/2013/11/01/views-menu-tabs-quick-guide). There are also assorted PHP code hacks. But I can't find recommendations about which solution is best for reliability and maintainability. It does appear that some of the techniques were written for older versions of Drupal, and may have been superseded.
One thing is that unskilled site administrators should easily be able to find all the content (tops, tabbed menus, and alternative bottoms). That might rule out of some of the modules: I can’t find the reference again, but at least one of them is said to implement its own special interface for keeping track of tabbed content rather than extending the standard Drupal interface.
This problem raised another question. How should I think about Drupal when working out how to do this? It’s well known that programming needs three key concepts, used both in describing control and describing data: sequencing, alternation, and repetition. If I were programming the problem in Pascal, I would represent the page as a record. The first field would represent the top half of my page; the second would represent the bottom halves. Because these require alternation, I’d represent them as a discriminated union. I’d also need some pragmatic information saying that the union is to be displayed using tabs and giving the tabs’ labels.
Now, it’s clear that some of the built-in Drupal menus implement that kind of alternation. I get the impression, actually, that they’re more important than the content itself, because users on various discussion groups have wondered why they couldn’t see their content, then been told by an expert that this was because it’s not attached to a menu. But I don’t think the Drupal documentation says this anywhere. A formal semantics of Drupal would be good, but I can’t find one. So when designing a structure like my page with one top and multiple bottoms, where should I start? What’s the equivalent of C.A.R. Hoare's famous essay "Notes on Data Structuring" that every computer scientist will know from the classic Structured Programming?