Newbie Content Structure Question

John Matlock asked on January 19, 2017 01:11

I'm creating a page that will show a list of recipes along with ingredients. My question is, what is the recommended approach to structuring such data (pages vs. module classes, etc)? There will not be a single page for each recipe, only the aforementioned list of all recipes. And I'd like to store ingredients (amount, description) as related data to the recipe.

Correct Answer

Anton Grekhovodov answered on January 19, 2017 06:06

Hi John,

I think it depends on how you prefer manipulating with data, the both variants are ok. You can do it via page types. Example of structure:
Recipe 1
-- Recipe ingredient 1
-- Recipe ingredient 2
Recipe 2
-- Recipe ingredient 1
-- Recipe ingredient 3
-- ingredient 1
-- ingredient 2
-- ingredient 3

Here you will need 3 page types: 1 - Recipe (title of recipe, description, etc), 2 - Recipe ingredient (link to an ingredient, amount of an ingredient, some special information about ingredient for a recipe), 3 - Ingredient (title, description, etc) But using pages for storing content has some limitation

The same structure you can do via module classes, but interface for manipulating with data you will create manually.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.