Problem/Motivation

It's (almost?) impossible for themers to display the forum topic list as anything other than a table. Even if you create a custom template_preprocess_forum override, and add a new template for the forum topics, you can't do much with it because the topics data is structured to be passed to the table template with a header and rows.

Proposed resolution

The template_preprocess_forum variables array should include the original topics data, so themers have an option to display it differently.

Remaining tasks

  • Create Change Record
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

megan_m created an issue. See original summary.

megan_m’s picture

Status: Active » Needs review
FileSize
474 bytes

And here is a patch to add the original topics data to the template_preprocess_forums variables

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Fine by me

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -the

Re-assigning variables is one of the anti-patterns that core does everywhere so I agree that we can add this. Maybe we should create a follow-up to remove all of the re-assignments of variables in preprocess functions, and maybe make that even a coding standard?

Anyway, setting to needs work still since we should document the newly created variable in the templates.

megan_m’s picture

Status: Needs work » Needs review
FileSize
1.03 KB

Here is a new patch with documentation added to the forums template. Is this the right place to add it? Is there any place else I should document this? Is the description okay?

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Thanks again

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record, +Novice

Sorry but I didn't realize this on my first review, but we do need a super small change record for this. This would be a great new contributor task so here are instructions how to do that.

vegantriathlete’s picture

Issue tags: +dcco2017

See @lauriii's suggestion in comment #7. Also creating an issue summary would be helpful.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

megan_m’s picture

Assigned: Unassigned » megan_m
Issue summary: View changes
megan_m’s picture

Assigned: megan_m » Unassigned
Status: Needs work » Needs review

Draft change record added.

vegantriathlete’s picture

Issue tags: -dcco2017

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

dillix’s picture

@megan_m can you reroll patch for 8.5.x? Then I can test it on our sites.

borisson_’s picture

Issue tags: -Needs change record

This patch still applies, I don't understand #15. There is a small offset in the patch - but that shouldn't be a problem. There is a change record, but I didn't really understand the change record untill I read the patch, so I updated that.

I think that means I'm not allowed to RTBC this.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.03 KB

Change record is much better now, here's a re-roll of #5 patch just without offset

dillix’s picture

Thanks @andypost. Patch applies successfylly for D8.4, D8.5 & D8.6

  • larowlan committed ac66ac9 on 8.6.x
    Issue #2890049 by megan_m, andypost, lauriii: Forum template cannot...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +KharkivGSW18

Committed as ac66ac9 and pushed to 8.6.x. Thanks

Given @andypost and @dillix have been working on a few forum issues during KharkivGSW18, tagging it as such.

Please remove if that is incorrect.

Would love to see you all over in #2207263: Try and build /forum and /forum/{tid} with views

dillix’s picture

@larowlan can you commit this to 8.5.x-dev? #17 applies fine and work with it as expected.

larowlan’s picture

Hi @dillix

As per http://drupal.org/core/d8-allowed-changes - feature requests can only be committed to the non-stable branch.

If a case could be made that this was a bug then it would be eligible.

Lee

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.