Using select query to pull more information

I have a section for videos which I need to associate a separate product with. Here’s my query in my video blueprint right now:

   product:
      label: Associated Product
      type: select
      width: 1/2
      options: query
      query:
         page: products
         fetch: children
         value: '{{title}}'
         productDescription: '{{productDescription}}'
         productURL: '{{productURL}}'

Obviously the last two lines aren’t outputting anything, but I’m trying to figure out how to attach the product description and link to the file to make it accessible.

Any ideas how I could accomplish this?

Have you tried @texnixe’s approach from this post: Blueprint select field queries for more than one page

Those options do not exist for blueprints.

You can only have “value” and “text”:

fields:
  product:
    label: Product
    type: select 
    default: architecture
    options: query
    query:
      page: products
      fetch: children
      value: '{{uid}}'
      text: '{{title}}'

You can then fetch the information you need in your template.

$product = page('products')->children()->findBy('uid', $page->product()->value());
echo $product->productDescription();
// etc.
1 Like

Thanks, this worked!