Opened 12 months ago
Last modified 10 months ago
#4551 new Enhancement
Type specific classes for lists
| Reported by: | juho.jaakkola | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.9.0 |
| Component: | Core | Version: | 1.8 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: |
Description
Lists rendered by elgg_view_entity_list() get the following classes as default:
- "elgg-list elgg-list-entities" (list_type = list)
- "elgg-gallery" (list_type = gallery)
When creating themes and new content types there's often need to style lists of different content types in a different way. It is possible to pass a class to the elgg_list_entities*() as list_class parameter. If I however have many lists throughout the site I would have to add that parameter to each call.
So how about adding two new list classes automatically based on entity's type and subtype?
Then for example a list of blogs would get the following classes:
- elgg-list
- elgg-list-entity
- elgg-list-object
- elgg-list-object-blog
And respectively:
- elgg-gallery
- elgg-gallery-object
- elgg-gallery-object-blog
Now it would be possible to easily define different css for example to a list of blogs and a list of videos.
(Btw, is the elgg-list-entity class currenly even used for anything?)
Change History (1)
comment:1 Changed 10 months ago by cash
- Milestone changed from Needs Review to Elgg 1.9.0

I'm fine with this. Setting to Elgg 1.9