Search

Hi, I need to make a change in the XML output of some DS.

in the example, I just need the group node, this is a data source with XML output grouped by, and elements empty:

<data-source>
    <section id="16" handle="section-name">Section Name</section>
    <group link-id="170" link-handle="title-handle" value="Title">
        <entry id="5404" />
        <entry id="7700" />
        <entry id="8020" />
        <entry id="1045" />
    </group>
    <group link-id="154" link-handle="title-handle" value="Title">
        <entry id="2545" />
        <entry id="1771" />
        <entry id="2821" />
        <entry id="1046" />
    </group>
<data-source>

to

<data-source>
    <section id="16" handle="section-name">Section Name</section>
    <group link-id="170" link-handle="title-handle" value="Title"/>
    <group link-id="154" link-handle="title-handle" value="Title"/>
<data-source>

Is this possible to do with some hack in the DS php files?

You're always going to get the entry node with an ID.

Is there any special reason you want to limit the result to just the group? It wouldn't save on overhead from an SQL point of view as the SQL will still be running to figure out what the groups are.

The section is provided by csv files from contributors, each entry of this section have a select box field and I just want to get data from another Section where there are linked entries.

I was thinking in some like mysql "GROUP BY".

In the last meeting it was defined that all categories (groups) will be shown. This solves the case, now I just need to get a simple DS that fetch all entries.

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