Hey there,
let me first thank you for the great module and work !! It's really fun using it :)
Now my issue: I am trying to apply custom css classes to events on the timeline based on the data in the row of the view result for the given event.
Grouping is not a solution for me because I am trying to apply multiple classes for one event.
The hook timeline_data_alter hook doesn't work for me, because the actual row data is not there anymore (just the rendered result). I guess I could use that, "hide" the information in there and with some parsing extract and remove it from the 'description' field but that just doesn't really feel good.
Maybe I am also missing something here?
If not, my proposal would be to introduce another alter hook (e.g. timeline_event_alter) and pass the event raw row data to allow modules make changes based on it. This way I can hide the field in views but still access the data in my module / theme. I attached a simple and hopefully correct patch with that solution. I am not sure if this the correct or even best way to accomplish this but for me it would work perferctly.
Any comments and / or help on that are very apreciated!
Thanks in advance! Cheers,
cossme
Comment | File | Size | Author |
---|---|---|---|
#1 | timeline_hook_event_data_alter.patch | 725 bytes | cossme |
Comments
Comment #1
cossme CreditAttribution: cossme commentedand here is the patch ;-)
Comment #2
xamanu CreditAttribution: xamanu commentedGenerally I think it is a good idea. But I'd have to have a better look on it. Anyway this would go into the 3.x version.