Maybe I don’t exactly understand when to use Select Box, and when to use the Select Box Link, but I’m getting strange results with the select box link. How come when I check the XML that is being pulled it only says the ID number instead of the actual text from the other section? Like so:

<item handle="open-enrollment" id="7">7</item>

It should say Open Enrollment all pretty like with caps and spaces there, right? Any way to fix this?

You can learn from the default installation. There you have articles linked to categories, and images linked to articles.

In short:

  • If you are linking from one section to a field of another section, you will create persistent links (based on IDs). This is why the article category in the default installation is built this way. (It might be renamed later, for example…)
  • You will need two datasources: The first DS will output a param to filter the second one.
  • You attach both datasources to your page.
  • The rest is only XSL magic.

Why do you need XSL magic? Let’s say you output 2 articles and 5 images to your page. You will need to find the right images for each of the articles. This can be done using XPATH alone, using the right IDs in your XPATH expressions. Another, more advanced solution will be using the xsl:key function. But the latter can make some headache before you really get it…

Sorry, but I don’t have the time to provide a complete example. I hope this helps.

It should say Open Enrollment all pretty like with caps and spaces there, right? Any way to fix this?

Indeed it should. Sounds like a bug to me.

No, it shouldn’t, because it’s a handle!

The value of the item node itself should not be 7. It should read:

<item handle="open-enrollment" id="7">Open Enrollment</item>

Hmmm. :-(

It sure seems like a bug to me. I’ve tried deleting the field and creating a new one with a different name, and it still happens. Yet, in another section I have a Select Box Link set up and it does the normal behavior. Is there other information I can give that would help to clarify the issue?

michael-e, thanks for your explanation above, it wasn’t in vain, this part was new to me, I’ll look at the default installation: “The first DS will output a param to filter the second one.”

Would you maybe pastie your entire XML output and a screenshot of your DS and Section configurations?

This is a bug in the Select Box Link field when “HTML-encode text” is checked on the Data Source. Issue #7 logged.

Sorry that I never followed up on this post, I ended up changing to regular old Select Box with Dynamic options. Seems like it accomplishes pretty much the same thing.

I also encountered another possible bug when I installed a whole new Symphony 2.0.6, downloaded from the website zip, deleted out the workspace folder, and installed. Then, tried to enable the Select Box Link plugin. I was not able to. I even downloaded the most recent version of the extension from github, tried putting that on the server and enabling it, and was still not able to.

That’s a known bug. Uninstall the extension and then re-enable it.

A related question about the Select Box Link field:

Is one of the disadvantages to using Select Box Link, instead of Select Box is that it cannot be used to filter at a Data Source level by the text instead of the ID?

For example, I have a Select Box Link that links to another section’s text field named “Project Name”, then I’d love to be able to filter that in the URL. But trying something like

Doesn’t return any results. “projects” being the page name, and then pharmacy website being the variable I’m trying to filter by.

Am I guessing that filtering by ID is the only way to accomplish what I want (other than filtering by XSLT?)

This is where you use an Output Parameter. You would need a “Project” data source that filters by the project name handle (using the URL Parameter), but then select System ID from the Output Parameter list. This will create a parameter caled $ds-project in the param pool which you can use to filter the Select Box Link field in another DS.

Wow, genius! Nick, thank you for your response! I actually sat down to reply to your explanation and say that I didn’t get it. But finally after reading your post over about 1,000 times, I got it to work! w00t.

Excellent! If you can think of another way of explaining the concept then please do - it can go into the documentation.

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