[wp-trac] [WordPress Trac] #37974: Add multi-panel feature to pages through add_theme_support

WordPress Trac noreply at wordpress.org
Thu Oct 6 13:01:55 UTC 2016


#37974: Add multi-panel feature to pages through add_theme_support
----------------------------+------------------
 Reporter:  karmatosed      |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  Themes          |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  ux-feedback     |     Focuses:  ui
----------------------------+------------------

Comment (by folletto):

 '''DESIGN'''

 See the attachment `multi-sections-dropdown-alt-concept` above for
 reference.

 The UI above is great, but there's one detail that nags me: why do I have
 to pick a specific Page if what I'm thinking of is a multi-section front
 page? This has probably to be tested, but in my experience people that
 look for a theme are thinking along these lines: "I want to configure the
 homepage as having multiple sections of content".

 Which means they are looking for front page / home page settings (✓
 check), then an option to have multiple sections, and then a way to
 configure it.

 Hence, I'd suggest to change slightly the way the above sections UI is
 shown, as instead of being associated as an extra option to a page, to be
 a separate option in the first dropdown (we can iterate on the label).

 As such, the dropdown will contain the usual list of pages, but on top
 there's also the special, new feature: "Multiple Sections". New feature,
 top visibility, not buried inside a "page".

 When "Multiple Sections" is selected, then the UI controls as above
 appear, it's empty, and it can be filled out from the pages list. This
 solves two problems:

 1. There's no "page" already in the sections list that can't be removed.
 2. If the user wants to change that page, they would have to go back to
 the dropdown and switch it (and then? should we clear the list entirely or
 just swap the item? confusing).

 '''TECH''

 Now, I don't know all the details or implications of this, but I can see
 how the above would work very well for backward compatibility, using the
 already standardized logic of WordPress' Template Hierarchy and its
 fallbacks. In this case I think it would work nicely if it could do
 something like:

 1. If `multi-section.php` is present in the theme, it gets used once the
 user selects the item in the dropdown.
 2. If the template file is not present, it just uses `index.php`,
 populating The Loop (`the_post`) with the list of the pages from the
 section management UI.

 If this is technically possible it would ensure alignment with the way
 themes are built, backward support and 100% customizability for themes,
 without further hacking or changing existing templates.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37974#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list