Presently all data is just presented as html CDATA in summary and content. This isn't so useful for media like videos which can be in
The best way to do this is as presently happens with RSS is to allow modules to create their own. To do this I've added an hook_atom_feed that can be used.
To make this truly extensible I've allowed modules to, optionally of course, add configuration options and additional namespaces. Presently in the Video example I'm just using this to turn on and off enclosures, but it could be used by CCK modules to correctly assign field to element. It could also allow elements in, different namespaces - probably useful for date fields, or implementing Dublin Core for all fields... for example.
The DRUPAL-5 patch includes the video.module example. I've not found a module already ported to 6 that I can productively use time to make an example for that patch yet, but I've rolled it for the possibility.
| Comment | File | Size | Author |
|---|---|---|---|
| atom extensibility DRUPAL-6 20080217.patch | 4.04 KB | ekes | |
| atom extensibility DRUPAL-5 20080217.patch | 5.67 KB | ekes |
Comments
Comment #1
ekes commentedOops, always remember to preview! Full text, without unescaped < :-
Presently all data is just presented as html CDATA in summary and content. This isn't so useful for media like videos which can be in <link rel="enclosure" ... allowing readers and parsers to deal with them appropriately.
The best way to do this is as presently happens with RSS is to allow modules to create their own. To do this I've added an hook_atom_feed that can be used.
To make this truly extensible I've allowed modules to, optionally of course, add configuration options and additional namespaces. Presently in the Video example I'm just using this to turn on and off enclosures, but it could be used by CCK modules to correctly assign field to element. It could also allow elements in, different namespaces - probably useful for date fields, or implementing Dublin Core for all fields... for example.
The DRUPAL-5 patch includes the video.module example. I've not found a module already ported to 6 that I can productively use time to make an example for that patch yet, but I've rolled it for the possibility.
Comment #2
ekes commentedHEAD patch tested against an example test cck type and committed.
Comment #3
deekayen commentedLooks like it only went in HEAD, which will be available first for D7, which is fine with me.