Search

Having tried a few things for my web side design I realized that the cleanest solution to the problem would be a field that could return dynamic xml based on the URL link. Sort of attaching a dynamic xml data source to a field. There are cases when you have a few entries in your section, and based on the entries you need to return dynamic xml based on some third party API. Let's say you have a list of ids in your section. There is a link out there that returns person's info based on the id (test.com/?get-info=id). What do you do? Create dynamic data source based on "test.com/?get-info=id" and attach it to the new "dynamic xml" filed. Or paste "test.com/?get-info=id" into the field so in your xslt you'll deal with a XML blob describing the person. Do we already have something like that (I couldn't find it in field extensions)?

Thank you,

I think you can already do that. Use a dynamic datasource and in the url use parameters like you do in other datasources. so insted of test.com/?get-info=id you would write test.com/?get-info={$ds-id}

Not sure if you've tried it but I believe it should work.

It does work, indeed. You can use Data Source parameters or page parameters in your URL.

No, it doesn't work. I tried it and I had to modify the grab function to work the way I need. The solution you propose will return multiple ids for one request. If for example your section has 3 entries text1, text2 and text3 you'll get a the dynamic datasource url like that: test.com/?get-info=text1,text2,text3. I described this behavior in my previous posts already. The final XML I need is a combination of xml1, xml2, xml3 where xml(i)=test.com/?get-info=text(i).

Modifying the grab function in that respect would make most sense. I don't think its very common issue. Most of the time everyone would have his own requirements, so modifying the grab would increase efficiency.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details