Search

Is there a way to paginate items in a mediathek field?

Pagination applies to multiple section entries, but the mediathek is just a field that links to section entries. I can’t apply pagination to a field.

I had assumed that by outputting the mediathek as a ds paramater (which generates a comma-space delimited list of item ids), I could then filter the mediathek’s linked section. That would return multiple results that could be paginated. But the ds filter doesn’t play nice with a ds parameter containing that sort of list. Is there another approach I can take?

Thanks.

That’s exactly the approach I would have taken as well. When you say that the data source filter isn’t playing nicely what is happening?

Much of the background is explained in detail here:

http://getsymphony.com/discuss/thread/47634/

When I use the mediathek ds parameter to filter the linked section, it only returns a single result matching the first id in the list. However, if I paste the literal value of the ds parameter into the ds filter field, results are returned for all ids in the list. I don’t think it’s a problem with mediathek since the literal values work just fine.

For example:

$ds-section = ‘91, 95, 128, 175, 179, 189, 191, 195’

If I enter $ds-section into the ds filter field, I get a matching item of with an id of 91. If I paste 91, 95, 128, 175, 179, 189, 191, 195 into the ds filter field, I get matches for all of them.

I’m working with Symphony 2.0.8RC3 and mediathek 2.05. I’ll include a screen shot of my extensions in case there’s mischief at work there.

alt text

Attachments:
extensions.gif

This might be related to the escaping process used for the data source parameter output: the system escapes commas to allow list of values the contain commas themselves. Maybe something gets messed up in this context?

Nils, does this approach to paginating a mediathek normally work for you? Do you think it’s a problem with the Symphony 2.0.8RC3 core, or something rotten with my particular install?

I’d guess it is related to the core but I’m not sure. I’ll have to set up a clean Symphony and Mediathek install to test it but it may take a few days until I find the time for that.

I went ahead and downloaded the latest version of 2.0.8RC3 to make sure I hadn’t missed any updates. I did a fresh install, added mediathek 2.0.5, created basic folders and images sections, and I got the same problem as before: 1 result for the ds parameter, all results with the literal.

Does filtering by parameter output work at all? Did you try using a selectbox link field to see if that works?

I added a select box link from the folders section to the images section and set up the data sources the same as with the mediathek, and it works fine. The ds parameter filters properly and returns multiple results.

Here is what the debug is showing:

(The code feature in the editor was chopping the code, so I’m attaching an image instead. : )

alt text

Attachments:
debug-1.gif

Okay, then it’s a Mediathek issue. I’ll check this over the next days.

Hi, although this might qualify as a cross-post, I found this discussion only after posting my issue, which is identical, but applies to Subsection Manager as opposed to Mediathek.

Linking to it for future reference’s sake.

UPDATE

It can be addressed with a small customisation of the datasource. See my post linked above.

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