Hello,
I have a clonable template page (proposals.php) with a repeatable region that allow me to select some options from a dropdown menu in the first cell, and then to enter some text in a regular input field. Code looks like this:
Let's say the "fruits-list.html" external opt_values file has the words "Apple, Banana, Orange".
I can fill my "proposal", and once I'm at the repeatable region, I can add the fruits needed, clicking on "Add a row" to add a new fruit to the proposal.
On another page, I am trying to list all proposals matching a fruit name.
Let's call it the fruits.php file.
The "fruits.php" page is also a clonable template page. Each entries are named after the fruits in the "fruits-list.html" file. So for example, my entries could be "Apple", "Banana", and "Orange". 3 entries total.
When I click on the "Apple" page (which is also the title of the page), I want to display all proposals that has "Apple" selected in the previously mentioned repeatable region, so I can so in which proposal I selected an Apple in the options.
But I cannot figure out how to display that information correctly. Here's my code on the "fruits.php" admin page:
(of course, this is wrapped with config_form_view )
It seems like "custom_field" is not getting that I'm looking for entries with the "fruits_options" region being equal to the current fruit page title, which is, in this example here, "Apple". I thought this would scan each proposals, and show me the ones with "Apple" being selected.
Any idea what I'm doing wrong, and how to fix my issue? Thanks a lot
I have a clonable template page (proposals.php) with a repeatable region that allow me to select some options from a dropdown menu in the first cell, and then to enter some text in a regular input field. Code looks like this:
- Code: Select all
<cms:repeatable name='fruit_block' label="Info about your meal">
<cms:editable name="fruits_options" label="Available fruits" opt_values='fruits-list.html' separator=',' dynamic='opt_values' type='dropdown'/>
<cms:editable name='fruits_notes' label="Notes" type='text'/>
</cms:repeatable>
Let's say the "fruits-list.html" external opt_values file has the words "Apple, Banana, Orange".
I can fill my "proposal", and once I'm at the repeatable region, I can add the fruits needed, clicking on "Add a row" to add a new fruit to the proposal.
On another page, I am trying to list all proposals matching a fruit name.
Let's call it the fruits.php file.
The "fruits.php" page is also a clonable template page. Each entries are named after the fruits in the "fruits-list.html" file. So for example, my entries could be "Apple", "Banana", and "Orange". 3 entries total.
When I click on the "Apple" page (which is also the title of the page), I want to display all proposals that has "Apple" selected in the previously mentioned repeatable region, so I can so in which proposal I selected an Apple in the options.
But I cannot figure out how to display that information correctly. Here's my code on the "fruits.php" admin page:
(of course, this is wrapped with config_form_view )
- Code: Select all
<cms:field 'proposalFruits' label="List of proposals containing this fruit">
<cms:set fruit_title="<cms:show k_page_title/>"/>
<cms:pages masterpage="proposals.php" custom_field="fruits_options=<cms:show k_page_title/>">
Proposals where <cms:show fruit_title/> were used :<br>
<cms:show k_page_title> - Link : <cms:show k_page_link/>
</cms:pages>
</cms:field>
It seems like "custom_field" is not getting that I'm looking for entries with the "fruits_options" region being equal to the current fruit page title, which is, in this example here, "Apple". I thought this would scan each proposals, and show me the ones with "Apple" being selected.
Any idea what I'm doing wrong, and how to fix my issue? Thanks a lot