Is there a way to use "Custom Dynamic XML" Datasource as field in a section?
This is an open discussion with 3 replies, filed under Troubleshooting.
Search
Brian, I can't offer you a solution, but I can say I think your idea would make for a pretty useful extension, and might also provide a workaround fix for sorting/limiting issues with the built-in select box.
In case anyone feels like tackling said extension, I can offer my thoughts on design requirements and potential problems. Here's what I think are the minimum requirements for what should be configurable per-field:
- URL (obviously)
- XPath expression (or equivalent): This should select a nodelist representing textNodes to include as options. Otherwise this option could be omitted in favour of an assumed standard XML format or a smart algorithm to deduce option text.
- Cache settings: Ideally the URL should set an
Expires
HTTP header (or similar) which can be used instead of this, but it might still be a good idea to allow for user override. One problem I can see is if the URL is within the same Symphony environment that your select box field is, it's likely that the option values XML will normally be updated immediately before needing to use the new options, in which case any form of caching will probably be undesirable. Conversely, waiting for Symphony to fetch external XML can significantly increase page load time.
I hate to revive an old thread, but did anyone ever make something like this?
Looks like there are a couple of options:
Create an account or sign in to comment.
Is there a way to use "Custom Dynamic XML" (External XML) Datasource as field in a section.
I'm trying to find a way to pull data (a list of people) from an external XML datasource and make it available when publishing to a section (just like you can do when setting up your section and selecting Dynamic options for a select box).
For instance, here are my example fields. My example would be an office list...
Office Branch Name => Text field
Office Branch City => Text field
Office Branch State => Text field
Office Branch Contact Person => Select Box (Dynamic) --- based on External XML source
Is there a way to do this? Has anyone tried something like this before?
My issue is that we have an XML list that is generated outside of Symphony. I would like to be able to choose the names from that External datasource from my publish window (just like I would with pulling from existing sections).
I hope I'm making sense. Any help or direction would be awesome. Thanks for your time!
BZ