Recipe Generation Order#
There is no direct way to control the order of the recipes. However if you’re using the Book Templates, you can limit which page accepts what recipe by providing the recipe_pattern.
Without filtering the recipes, the order of the recipes in the book is based on the alphabetical order of walking the filesystem in the recipes folder in the Behavior Pack.
Example#
The example below shows how you can use the recipe_pattern to put some of the recipes in front of the others.
{
"pages": [
{
"page": "Recipes Page",
"recipe_pattern": "shapescape:(witches_hat|beenade|bouncy_bomb)"
},
{
"page": "Recipes Page"
}
]
}
With this configuration, the recipes shapescape:witches_hat, shapescape:beenade and shapescape:bouncy_bomb are used by the first page template. After they’re used, the first page template won’t have anything left to generate so the second page will start generating remaining recipes until it runs out of recipes.
Note that there is no way to specify the order of the recipes generated by the first page template. Their order is based on the order of the flies. You could define more pages to order the recipes even further but if a page displays multiple recipes at once, there is no way to control it without renaming the files in the recipes directory.