3

I'd like to export a (views)-list of events to re-import it with Indesign or Pagemaker, so XML, CSV or RTF-format would be great. The list should be restricted to one, the current month (this is no problem with views or even views bulk operations). The important thing is: the events must be grouped by the event-day and their respective categories (concert, theatre).

I already tried the Views Data Export module, but there is no way of grouping the fields. So every "event" has all it's fields in one column.

Is there another module you could recommend or do i have to do this programmatically (which I can't unfortunately).

Thanks in advance for every hint...

Update Thanks to WestieUK i installed the Views Data Source module, which is working great, but not as expected. There's also no grouping of fields (at least not obvious).

So this is what i have:

<root>
    <events>
       <eventdate>21/7/2012</eventdate>
       <categorie>Clubland</categorie>
       <location>Club A</location>
       <title>Klanglabor</title>
       <time>21:00</time>
    </events>
    <events>
       <eventdate>21/7/2012</eventdate>
       <categorie>Clubland</categorie>
       <location>Club B</location>
       <title>Soundlabor</title>
       <time>21:00</time>
    </events>
</root>

I'd like to have it something like this:

<root>
   <eventdate date:21/7/2012>
       <categorie name:Clubland>
           <events>
              <location>Club A</location>
              <title>Klanglabor</title>
              <time>21:00</time>
           </events>
           <events>
              <location>Club B</location>
              <title>Soundlabor</title>
              <time>21:00</time>
           </events>
       </categorie>
    </eventdate>
</root>

Any ideas? If this can be achieved prorgammatically, like making a custom module (based on perhaps the Views Data Source module), I'd give it a try with your help!

Thanks!

  • Try changing your views format to table. Once your format is table then you will be able to group all your fields based on event date in the settings link. Then export that views using data source – Minty Jul 22 '12 at 0:22
  • Have you completed this task – Cindrella Sep 21 '12 at 12:24
  • No, not yet. I put it off for now... – Volker Nov 1 '12 at 12:29
3

Views Data Source is pretty awesome for XML, the 7 release is in dev but we are using it on our D7 to create feeds for android / iphone apps and a intranet running D6.

  • Thanks, but how do you group fields with this module? – Volker Jul 18 '12 at 15:28
  • You could try put toot element name as "root" and top-level child as "eventdate", however I dont know how you would be able to get the date in on the eventdate row. – WestieUK Jul 19 '12 at 7:37
  • Thanks a lot for your help, i'll give that a try... i haven't even thought about rewriting the output. Sometimes you don't see the wood for the trees :) – Volker Jul 19 '12 at 7:49
  • Ok, rewriting the output of a field is possible, but i loose the xml markup. I can't get additional nesting to work here... – Volker Jul 19 '12 at 7:55
  • Hi sorry i tried it and faced same problem so I edited my comment reply. Thinking about it, when you rewrite can you not just wrap the tokens in the XML, for example "<time>[time]</time>"... A bit of a funky way of doing it but might work – WestieUK Jul 19 '12 at 8:00
1

I would advise to use Services module together with the Services Views

  1. After installing the modules create the view with the fields in the sort order you need.
  2. Define the needed end points
  3. Get your XML by for example: http://example.com/rest/views/events
  • I tried Services Module already but also couldn't find an option to group my fields like necessary. Actually I couldn't even export the title field. There was the nid available only... – Volker Jul 21 '12 at 19:23
  • can you provide an example how to group fields? – Volker Jul 21 '12 at 19:24
0

Under your Format , choose Field. Then keep the format unformatted list. Right next is the settings, there select event date as grouping field nr 1 and then select categories in grouping field nr 2.

Check Remove tags from rendered output on both options

Hopefully this should properly format your views display to what you are looking for.

0

Another option to consider for addressing these requirements is the Forena module.

You would use it's report writing features (such as its WYSIWYG report writer and/or it's query builder) to first create a report that fits your needs. The result of it could be a tabular output and/or graph. After the report content matches the specifications, you could save it as (e.g.) a CSV or XML file. Did I mention it also comes with some interesting hooks?

Refer to Reasons for considering Forena to understand why I think it might be a good fit, especially because of this part in it:

... if you want to do aggregation or analytics, Forena is much more suited to address these requirements."

The Forena Video demos and tutorials contain quite some links to live demos.

Disclosure: I'm a co-maintainer of this module,
I hope this does not violate the site's policy on self-promotion.

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.