I'm working on a project where the display text of a View contains the labels in standard uppercase formate for humans to consume. I created another display to provide as an XML document but the labels as XML tags need to be lowercase. Instead of having to override all fields, it would be nice to just transform the existing labels to lowercase.
I'm working on a patch to provide this functionality and I'll post it here soon.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1964392-case-change-custom-node.patch | 5.9 KB | minoroffense |
| #2 | 1964392-case-transform.patch | 2.12 KB | minoroffense |
Comments
Comment #1
minoroffense commentedComment #2
minoroffense commentedHere's the patch. You'll find the new options in the XML form settings.
Comment #3
minoroffense commentedI've extended the patch a bit. This allows custom root and item nodes in case the user doesn't want to use the base table and/or entity type as the tags in their XML.
Comment #4
littlepixiez commentedHi there... I don't suppose you could help me? I've patched everything successfully but I can't find any extra options in the XML form? Where should I be looking for this? (in the View?)
I can override the tags with labels for the fields, but I need to replace the overall envelope with ....
Comment #5
minoroffense commentedThe options are in the style settings. When you set your display to us XML, the settings link next to that should list the options stated above.
Same place where you would go if you had selected HTML List and you wanted to configure what kind of HTML list.
Comment #6
steven jones commentedThe XML node names was handled in this issue: #1218896: Specify XML Root elements in views_data_export? as for the transforming of case of the labels, hmm...I think that I'm okay with just making people change them all manually.