You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
ServingSize | cssclass | Alias | Tag | Date | DocType | Hierarchy | location | CollapseMetaTable | Meta | Recipe | Ingredients | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
recipeTable | 2021-09-21 | Recipe | NonRoot |
|
Yes |
|
|
Parent::
name Edit Recipe parameters
type command
action MetaEdit: Run MetaEdit
id EditMetaData
^button-<% tp.file.title %>Edit
name Save
type command
action Save current file
id Save
^button-<% tp.file.title %>NSave
<% tp.file.title %>
style: number
Practical Informations
Courses: | $=dv.current().Recipe.Courses |
Categories: | $=dv.current().Recipe.Categories |
Collections: | $=dv.current().Recipe.Collections |
Serving size: | $=dv.current().ServingSize |
Cooking time: | $=dv.current().Recipe.CookingTime min |
Ingredients
var ing = [];
for (var i = 0; i < dv.current().Ingredients.length; i++) {
var name = dv.current().Ingredients[i].replace(dv.current().Ingredients[i].split(" ")[0] + " " + dv.current().Ingredients[i].split(" ")[1], "");
var unit = dv.current().Ingredients[i].split(" ")[1];
var amount = dv.current().Ingredients[i].split(" ")[0];
ing[i] = "🥣 " + (amount / 2 * dv.current().ServingSize) + " " + unit + " <b>" + name + "</b>"
}
dv.list(ing)
Instructions