Given a predefined hierarchy of foods, a user while viewing a specific food on the back-end can add/edit text associated with that specific food, its parent, and its grandparent. Text for each level is optional, and can be left blank.
For instance, if they are viewing "Beef Wellington", they can add "Common for weddings." to the specific food, "It's whats for dinner." to the parent (Beef), and "Has high protein." to the grandparent (Meat). The text in the parenthesis shows sample text which they entered.
- Meat (Has high protein.)
- Beef (It's whats for dinner.)
- Beef Wellington (Common for weddings.)
- Beef Stroganoff (Great for a cold day.)
- Chicken (Very versatile.)
- Chicken Cordon Bleu (Nice and cheesy.)
- Chicken Marsala (Great with mushrooms.)
- Beef (It's whats for dinner.)
- Vegetables (Low fat.)
- Broccoli (
null
)- Steamed Broccoli (Yummy!)
- Broccoli (
- Grain (Good carbs.)
- Rice (A cheap grain.)
- Fried Rice (
null
)
- Fried Rice (
- Rice (A cheap grain.)
Now, when another user is viewing "Beef Wellington" on the front-end, they would see (not able to edit):
- Has high protein.
- It's whats for dinner.
- Common for weddings.
And if that user views "Beef Stroganoff" on the front-end, they would see:
- Has high protein.
- It's whats for dinner.
- Great for a cold day.
How should the back-end user be able to add and edit text for the specific food, its parent, and its grandparent while viewing a specific food?
EDIT. I don't necessarily like this approach, but this is one idea which might better communicate what I am trying to do.