Rob(AU) Posted April 15, 2020 Share Posted April 15, 2020 Hi, I am learning PHP while in the process of building a recipe website and enjoying the challenge. One dilemma has stumped me. I have an Ingredients List page, which is parent to a series of ingredient pages. The ingredient pages has two fields, Title and ingredientType (for spices, dry, wet, vegetables etc). Thus there is one list of Ingredients available to be included in recipes. On the Recipe template there is an Ingredients Repeater field that includes fields for quantity and extra details (like room temperature for butter for example) as well as the ingredient field. If I include the ingredientType field in the repeater it shows as a blank field rather than showing the data saved from the ingredient page. It looks a little like this: Ingredients List page ingredient page - title field - ingredientType field Recipe page title field description field Ingredients repeater field quantity field ingredient field ingredient details field What I want to do is be able to include the ingredientType field in the array that the Recipes template uses to output the Recipe page. I will then use the ingredientType to sort the Ingredients Repeater data for output. Conceptually this could either be at the adding a new recipe stage, or by somehow adding the ingredientType data to the array used for page output. I just can't work out how to do it. Any clues would be greatly appreciated. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now