Skip to:

Opened 5 years ago

Closed 5 years ago

#3278 closed enhancement (fixed)

Include view name as body class

Reported by: clorith's profile Clorith Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.14
Component: API - Topic Views Keywords:


Currently bbp_body_class checks if it is a single view, and if it is, adds the class bbp-view, which helps identify a singular view, but not which view.

Extending this to also include the current view, for example bbp-view-${view-slug} would allow for more direct targeting of classes for styling and conditional JavaScript.

Change History (2)

#1 @johnjamesjacoby
5 years ago

  • Component changed from General to API - Topic Views
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

#2 @johnjamesjacoby
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 6930:

Topic Views: pass view ID into body class.

This commit does a quick audit of Topic View API functions, and ensures their return values are as documented. This allows for safely adding the Topic View ID as a class to the body element of the page when viewing a single Topic View.

Fixes #3278. Props Clorith.

Note: See TracTickets for help on using tickets.