Closed (won't fix)
Project:
Views data export
Version:
7.x-3.2
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
19 Jul 2012 at 11:20 UTC
Updated:
6 Dec 2024 at 14:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pindaman commentedI would like the xml rows to have attributes.
Comment #2
cdmo commentedIt doesn't seem that there is any way to create an XML document with attributes for D7 using any contributed module, including this one. If I'm wrong, please correct me. Services Views does something similar to this module, you can output xml with no attributes. You also don't have any control in terms of nesting. I'm thinking that I might have to just output the fields I want in a view, and then use a combination of the views pre render hook along with templating.
Comment #3
steven jones commentedYeah, tempting would be the way to go here I think. Sorry!
Comment #5
shaxa commentedWe have to workout this as it is common usage.
Comment #6
shaxa commentedHere is a patch for doing this. So when you use the patch on settings of your xml file format you will have checkboxes for which fields you would like to use as attributes. And when you check those fields what is the attributes name which you are using for it. Then magic happens. Note that it will get the name of the attribute from the settings and then will get the value of the field as you display it. So if you display a link it will show a link so be careful what you use as field value. Also if cdata wrapper is checked it will show it as well in the attribute.
Comment #7
shaxa commentedComment #8
guruslot commentedDear ShaxA, thank you so much for a nice patch I was looking for. The only question I have is that if I exclude fields from display they also hidden from attributes. So I need move those fields from body to attributes. Will be very appreciate for advice on how to approach that in best way. Thanks again!
Comment #9
netzkombuese commentedHi there.
This one seems to be exactly what I need for one of our projects.
Unfortunately I can`t apply the patch to 7.x-3.x-dev.
Could you just tell me which version do I have to apply this patch to?
EDIT: Got it. Thanks
Comment #10
the_paulus commentedI had the same issue regarding fields showing as both attributes and nodes. I just modified the theme/views-data-export-xml-body.tpl.php as follows:
Comment #11
guruslot commentedIs it possible to change output of some fields like written below within
tags?
Comment #12
denix commentedHi all,
I've applied the patch to version 3.2 but it does not work as expected
Comment #13
denix commentedSorry, my bad. Few drush cc all and the option was there. thanks
Comment #14
aleevasWas combined patch from #6 and #10 and re-rolled against 7.x-3.x branch
And in this state it works for me.
Comment #15
sano commented#14 works for me with version 7.x-3.2. Thank you.
Comment #16
steven jones commentedSorry for the lack of attention to your issue, please accept my apologies.
Drupal 7 is going to be end-of-life'd by the community in approximately 1 month.
As such, I am closing all non-critical looking, non-PHP compatibility issues for Views Data Export to tidy up the issue queues and reduce the noise. You can read about this on #3492246: Close down Drupal 7 issues.
If you feel like this issue has been closed by mistake, please do comment about re-opening it.
If you feel like the ticket is still relevant for the 8.x-1.x version of the module, the please search for a duplicate issue first, and if there really isn't one (and you've looked properly) then change the version on the ticket and re-open.
Thanks to everyone involved in this issue: for reporting it, and moving it along, it is truly appreciated and the Drupal community wouldn't be what it is today without your involvement and effort, so I'm sorry that we couldn't get this issue resolved. Hopefully we'll work together in a future issue though, and get that one resolved :)