From 0ab21f99413d19c589bf71b4e2b514f3eb6ad2e8 Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Sat, 6 Nov 2021 17:39:23 +0100 Subject: [PATCH] Fix Templating documentation Fix bad variable naming in docs --- docs/features/templating.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/features/templating.md b/docs/features/templating.md index b5102a50b..ae351c72d 100644 --- a/docs/features/templating.md +++ b/docs/features/templating.md @@ -17,7 +17,7 @@ from recipe scaling. Currently the only available variable in the Templating context is `ingredients`. `ingredients` is an array that contains all ingredients of the current recipe step. You can access an ingredient by using -`{{ ingredient[] }}` where the index refers to the position in the list of ingredients starting with zero. +`{{ ingredients[] }}` where the index refers to the position in the list of ingredients starting with zero. You can also use the interaction menu of the ingredient to copy its reference. !!! warning @@ -28,10 +28,10 @@ You can also use the interaction menu of the ingredient to copy its reference. You can also access only the amount, unit, note or food inside your instruction text using ``` -{{ instructions[0].amount }} -{{ instructions[0].unit }} -{{ instructions[0].food }} -{{ instructions[0].note }} +{{ ingredients[0].amount }} +{{ ingredients[0].unit }} +{{ ingredients[0].food }} +{{ ingredients[0].note }} ``` ## Technical Reasoning @@ -43,4 +43,4 @@ The template could access them by ID, the food name or the position in the list. 2. **Name**: very nice to read and easy but does not work when a food occurs twice in a step. Could have workaround but would then be inconsistent. 3. **Position**: easy to write and understand but breaks when ordering is changed and not really nice to read when instructions are not rendered. -I decided to go for the position based system. If you know of any better way feel free to open an issue or PR. \ No newline at end of file +I decided to go for the position based system. If you know of any better way feel free to open an issue or PR.