Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The forum index page at /forum should be converted form a table to a list. The current table mark-up treats containers, forums, and subforums as table rows. Since all of them are structurally the same in the HTML mark-up, flexibility for themers is limited. A nested list structure would provide more flexible mark-up for themers. Semantically it also correctly defines the relationships between containers, forums, and sub-forums.
I am prepared to submit a patch for this.
Comment | File | Size | Author |
---|---|---|---|
#5 | forum-1130276-5.patch | 1.27 KB | DevElCuy |
Comments
Comment #1
droplet CreditAttribution: droplet commentedsub
Comment #2
MichelleI've done extensive work in changing the layout of this page in Advanced Forum but it never occurred to me to use a list structure. I'd like to see what's come up with here and see if it's anything I can use. I haven't quite finished the AF changes as there are a few remaining issues to iron out but it's closer to other forum apps than Drupal core is. If there's anything in my work that you can make use of, feel free. :)
Michelle
Comment #3
megan_m CreditAttribution: megan_m commentedThanks for commenting, Michelle! I was planning on getting in touch with you at some point...
It turns out that this is a bit more complicated than I expected (surprise!). The output for the forum list comes from get_taxonomy_tree, which doesn't output a nested array. You get a flat array which doesn't easily enable you to format it as a nested list.
Comment #4
mattyoung CreditAttribution: mattyoung commented>get_taxonomy_tree, which doesn't output a nested array.
take a look at the comments in http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/func...
Comment #5
DevElCuy CreditAttribution: DevElCuy commentedImplementation of forum_get_tree(), based on the function commented at #4.
Comment #6
MichelleSetting this "needs review" since there's a patch, now.
Michelle
Comment #7
Liam McDermott CreditAttribution: Liam McDermott commentedI won't mark this as needs work since I'm not sure on this, but shouldn't the *_get_tree function be part of the taxonomy module? I'm sure other people are looking for this functionality in non-forum related modules.
Comment #8
xamanu CreditAttribution: xamanu commentedI agree with Liam - it should be included in the taxonomy module. There is a patch available now: #1409780: Include hirarchical version of get taxonomy_get_tree
Anyway, I might not get the point completely. I just think, putting all the output of the forum list into a nested list would drive us into another problem: We'd loose a lot of semantics, since additional information, such as "Topics", "Posts" and "Last post" would be not clearly assigned to the respective information (as it would through the table's columns structure). Screen readers might not interpret the information in a good way.
Comment #9
yoroy CreditAttribution: yoroy commentedLooks like this changes the look of this page. Would be good to have before/after screenshots to help review.
Comment #10
droplet CreditAttribution: droplet commentedWhat's the purpose of this issue ? convert from table to list or adding a function for later use? I don't see any markup changes there.
Comment #11
megan_m CreditAttribution: megan_m commentedTo convert from table to list. The problem is that it needs a get_taxonomy_tree function that actually outputs a hierarchical tree rather than a flat list. That needs to be addressed before we can fix the mark-up (see issue mentioned in #8, above)
@xamanu It's kind of a trade-off. Right now the sub-forums are structured with a
<div class="indent">
inside the table cell. That's the only structural difference between container forums and sub-forums. Converting to a list would provide a semantic relationship.There is a bit of a trade-off here. You lose the relationship between number of topics and posts, but you gain the relationship between parent and child forums. Personally, I think the latter is more important.
Comment #12
DevElCuy CreditAttribution: DevElCuy commentedAdding tag "dlatino" for reference of the Drupal Latino community.
Comment #13
joelpittetWould it be worth moving this to a view so the style can be changed, then default it to a ul list view? Or would the nesting still be an issue?
Comment #20
geek-merlinComment #27
quietone CreditAttribution: quietone at PreviousNext commentedForum is approved for removal. See #1898812: [policy] Deprecate forum module for removal in Drupal 11
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
It will be moved to the contributed extension once the Drupal 11 branch is open.