Search

I've spent hours on this issue and am now at wits end.

I have created a list summary of content that I am trying to file using URL parameters.

My Page has 2 URL Parameters

category/chapter-section

My Data Source has two result filters using the {$param} syntax.

{$category}

and

($chapter-section}

My Output Options uses those two parameters are Required URL Parameters.

{$category}/{$chapter-section}

These do show up in debug mode.

<params>
    ...
    <category>fruit</category>
    <chapter-section>apples</chapter-section>
    ...
</params>

The problem is that the content is never properly filtered.

http://localhost:8888/mysite/fruit/apples/

I get no records at all. Most combinations of settings give me either all records or no records. Using only one URL Parameter works correctly. Adding the second always fails.

Can anyone steer me in the right direction?

Just to start with the obvious, are you sure you have entries which match both of those parameters in your system?

If so, then what happens if you hard code two values that you know are in the system (category and chapter-section)? Does that produce anything?

Also, are you checking the XML using ?debug or just looking at what's delivered in the front-end template?

Just to start with the obvious, are you sure you have entries which match both of those parameters in your system?

Yes, Category is defined within my section with the handle of category as a defined content type. Similar for Chapter Section

If so, then what happens if you hard code two values that you know are in the system (category and chapter-section)? Does that produce anything?

No

Also, are you checking the XML using ?debug or just looking at what's delivered in the front-end template?

Yes of course, and you can see that I have identified the parameters as defined in the XML source in my original post.

Does your Required URL Parameter field look like this?

alt text

Try with this

alt text

The params that show up in debug mode come from PAGE settings.

Filling the Required URL Parameter field essentially says: if any of these parameters is not set, return empty.

It can be populated with URL params as well: $url-value, $url-foo etc.

In your case, you want to populate the field with your 2 PAGE parameters as shown above.

Attachments:
ds-debug-2.jpg and ds-debug-1.jpg

You can only have one required parameter I'm afraid.

I was able to figure this out.

The issue was that in my Section that my Chapter Section field was set as Select Box and not Select Box Link. Changing that designation and resting these values on the individual content items allows my URL with 2 parameters to work.

So, does anyone know why this is? I don't see how the distinction mentioned above is relevant, but maybe a better understanding of why would help me to understand better how Symphony works.

VladG: Yes to your first question, I am using the slash separator but will try the comma.

designermonkey: Are you sure? Can you point me to place in the documentation that state this?

It's always been that way, one required parameter only.

The singular use of the word parameter in the datasource editor:

An empty result will be returned when this parameter does not have a value.

kind of gives this away. Also, the placeholder in the field is singular, and if you wanted to read through the code, it processes only a single parameter and a fallback value as $param:fallback.

@designermonkey thanks for claryfing this one.

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