Search

I have an “Articles” content type and an “Images” content type. Each image has a select box link to articles, so I can associate each image with an article.

On an article’s page, I’d like to show the related pictures. The display page has a $title parameter that is the handle of the article title.

I have a data source that retrieves the correct article by filtering using the handle. But I cannot filter the images by through the select box link using the title’s handle – I get a “No records found” error when I try. Is there a way to do this? Can I only use the article ID?

What you’d need to do is select the system ID under “Parameter Output” for your Article data source. A new parameter will be created with a list of Article IDs. Then filter your images by that parameter.

Can I only use the article ID?

When you’re using the Select Box Link, yes only the IDs will work. The SBL field uses entry IDs behind the scenes to link the two together.

If you really must use the $title only, your link between the two sections could be done with a Select Box (with dynamic values pulling from Articles) — this stores the relationships not as entry IDs but the actual string value of your article. The major downside here is that if your article title were to change, the relationship would break and you would need to revisit each image, reselect the new article name, and re-save.

Select Box Link is the best method because it is more robust.

Some other useful threads:

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