I have a ajax template and would like to query the channel to select certain entries for a drop down select. How should I modify the code below to get all the results needed.
Trying to modify the JSON feed for the following:
$productSelect = new SelectBox('What would you like to purchase?','Choose a product category');
$productSelect->addItem('Phones','phoneSelect')
->addItem('Notebooks','notebookSelect')
->addItem('Tablets','tabletSelect');
Each addItem needs to be a channel entry. Right now the EE template is not accepting the channel entry call using the modified script below...
$productSelect = new SelectBox('3. Select a Product','---');
{exp:channel:entries channel="product" category="2" dynamic="off" disable="member_data|pagination"}
$productSelect->addItem('{title}');
{/exp:channel:entries}