How do I create a PHP file that returns a list of nodes as XML when called if I have a menu structure like this:

--gallery 1
---Item 1
---Item 2
---Item 3

And I want a url like localhost/getgallery.php

this url will then return my gallery as xml, something like this

    <gallery name="gallery1">
        <item name="item1">
            <description>lorum ipsom</description>

Where Image, Imagethumb, url and description are fields on the item node

Thanks in Advance!


This is what i did:

  1. I created a view.
  2. Changed the style to XML data document (Need to download the Views Datasource module)
  3. Added the fields I needed and Nodequeue
  4. Added a filter to filter by node type so it looks like this:

Views settings then I added a new page with a path:

Page settings

my end result looks like this:

        <gallery>Gallery1 For flash</gallery>
        <gallery>Gallery2 For flash</gallery>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.