Search

Hi Nils, i had no luck with the SSM, but SBLC did the trick!
For SSM it would be cool if you could set the variables displayed under the caption field as a filter in the filter field... But i guess that's easier said the done? (i guess cause the variable get's fetched after the filtering takes place?)

Is it possible to filter a data-source and output to the xml just the 3 first subsection items?

Nils and Hanah,

Just wanted to thank you for this marvelous extension.

Peace.

@Renan_Santos

I believe this is done within a datasource.

ds

In the above example, I've limited the output of category to name and title.

Is this getting at what you're asking?

Thanks Will, but not.

I would like to output just a certain number of items. Not fields.

So, te question using your example would be: If you have created 5 categories, could you output just the 3 first categories to the xml?

Simple answer is no.

You could output the IDs of your 5 categories as parameter in one Data Source and use these IDs to filter another Data Source that pulls from you subsection (not you Subsection Manager) directly. Limiting the second Data Source to 3 will give you the desired XML.

Thanks Nills.

If you have lots of entries with subsection, then this second Data Source can not be limited since we don't know how many subsection items we will have in total.

Why can't it be limited?

Because the subsection items would mix with all subsection items of each section entry, right?

I'll try it later and see what i get.

That's why you have to filter by the IDs the first DS added to the parameter pool.

Nils, I think what you say only works when you output just one entry from the parent section. When you show more than one entry, you get many category IDs in the ouput parameters, but you can't the child section datasource on the fly to get the entries for each parent entry.

Renan, I think one way would be to create a custom datasource and define the limit of child section entries there. Use this limit to modify the $data that gets passed to the appendFormattedElement() method. The SSM iterates over `$data['relation_id']´, so this is where the limit has to be used.
This is of course just a theoretical high level idea, but I guess it should work.

@Jonas Exactly!

Custom datasource is too advanced for me. I will try to output everything and do the work using xsl. It seems i'm not going to have so many entries.

Thanks guys!

How would I create 2 Subsection tab? Seem one active tab is working and one inactive tab is not clickable.

It seems that there is a conflict with this and the Union Datasource extension, or vice versa?

I have two sections, one is for business entries, the other is for images. Business entries has a Subsection field to link to image entries.

The XML returned by the union datasource seems to always include the image information, whether the core datasource has it as an included element or not. But the problem is that it's not complete, or at least it doesn't seem like it. Rather than pulling in the file information, image path, etc. All I'm given is a list of item id's:

<images field-id="55" subsection-id="8" items="5">
  <item id="170" />
  <item id="171" />
  <item id="172" />
  <item id="173" />
  <item id="174" />
</images>

Again, this is showing up in the XML even if I don't include the Images element. If I use the core datasource I created, rather than Union Datasource, it pulls in the file associations correctly.

Any ideas on this? Thanks!

James, in case you are using Symphony 2.3RC: tabs have not been updated yet. Symphony 2.2.5 should be fine.

Tyler, what's the real issue:

  • that the images node is included at all or
  • that the item elements are empty?
that the item elements are empty?

That one. I was just pointing out that the images node is included, but empty, regardless of if it's selected as an included element in the datasource. Sorry for the confusion.

Hi,

This is my first post. I've just switched to Symphony (from SilverStripe) for a new web project, and I absolutely adore it.

I'm also very impressed by the variety and quality of extensions being created (and frequently maintained) for Symphony.

The Subsection Manager is the one getting the most action on my product catalogue at the moment. It's made linking brands, categories, images and downloads to products a breeze. Thank you.

I just have a suggestion to make regarding the interface for a particular setup that I'm using:

For product images, I want the ability to add, delete and sort, but not list nor edit. This is purely for simplicity (I'll look into the process of automatically removing orphaned files further down the line).

When creating a new file, the edit panel slides out and I'm able to attach an image and set a caption. When I then click save, the edit panel remains open, and this is the same for subsequent items added too. I've tried this in Firefox and Chrome.

I think if 'Disallow item editing' is selected, then the edit panel should close as soon as the item is created.

Anyway, that's my 2 pence!

Looking forward to a bright future of Symphony development!

Welcome Tim,

Thanks for your feedback. I'm currently updating the Subsection Manager interface for Symphony 2.3 which will include new field settings. I'll keep your suggestion in mind for that.

Hey @Nils, I solved my problem above. It seems that both of the datasources I had in the Union Datasource needed to pull in the included element. I was doing it on just one before.

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