Is it possible to specify the 'Root element name' and 'Top-level child element name' for XML exports ?
views_datasource allows specifying these, where views_data_export outputs
<nodes>
<node>
specified fields...
</node>
</nodes>
Or did I miss this option? (I'm using the 7.x version).
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | views_data_export-1218896-specify-xml-elements.patch | 5.55 KB | steven jones |
| #8 | views_data_export-1218896-8.patch | 3.82 KB | roderik |
| #5 | views_data_export-1218896-5.patch | 4.38 KB | dmitriy.trt |
| #2 | views_data_export-1218896-1-svn.patch | 2.98 KB | skilip |
Comments
Comment #1
steven jones commentedNo, we base it on the base table, but there's nothing stopping us from adding this option.
Comment #2
skilip commented1+ and a patch. I'm sorry for the SVN patch. It's just a few lines of code ;)
Comment #3
duncan.moo commentedso I did the same as I do on other views to override the theme, but it made no difference:
The view detected the override template file, but the row items still come out as and , not and as I would like. Is there a way of doing this through templates?
Comment #4
duncan.moo commentedJust switched to using views_datasource for what I am trying to do and it is a far simpler solution which does allow you to change the root and row items in your feed.
Comment #5
dmitriy.trt commentedRe-rolled against latest git code and fixed it a bit: sites can upgrade from original module without having to re-configure each XML display.
Comment #6
zrpnrPatch in #5 worked for me, the defaults show up correctly when no values are set.
Comment #8
roderikMindless* reroll; don't credit me.
* I did verify structure of code/changes is still the same and remove trailing space somewhere; am not familiar with the code's logic though.
Comment #9
joshf commented#8 worked great for me; thanks for the patch!
Comment #10
steven jones commentedComment #11
steven jones commentedHere's a patch, based on #8, but with tests, if the test bot likes it, I'll commit it.
Comment #12
steven jones commentedThanks everyone! Committed to 7.x-3.x.
Comment #13
steven jones commentedWe should probably backport this to 6.x-2.x.
Comment #14
steven jones commentedPushed to 6.x-2.x