I would like to create a TV drop down selection, fed with entries following a template, as in:
The template "project" will have a TV which is drop down menu, displaying all the entries -documents- which are assigned the template "brands", is it possible?
-
☆ A M B ☆
- 24,524 Posts
Yes. Use a @SELECT binding in the Input Option Values field, to get the resources that have the correct template.
@SELECT pagetitle,id FROM modx_site_content WHERE template = 1
This will display the drop-down with the page titles of the resources, while its output will be the resource ID that was selected. You can manipulate that using output modifiers, fastField, or any other snippet or utility to deal with resource IDs.
-
☆ A M B ☆
- 24,524 Posts
The fieldname is pagetitle, not pagetitleb, and you have to tell the SELECT query what table to select from.