diff -u b/core/profiles/demo_umami/demo_umami_content/default_content/articles.csv b/core/profiles/demo_umami/demo_umami_content/default_content/articles.csv --- b/core/profiles/demo_umami/demo_umami_content/default_content/articles.csv +++ b/core/profiles/demo_umami/demo_umami_content/default_content/articles.csv @@ -1,4 +1,4 @@ -title,body,author,slug,image,alt,tags +title,body,author,slug,image,alt,tags Give it a go and grow your own herbs,"There’s nothing like having your own supply of fresh herbs, readily available and close at hand to use whilst cooking. Whether you have a large allotment or a small kitchen window sill, there’s always enough room for something home grown.

Outdoors

@@ -27,7 +27,7 @@

Coriander (Cilantro)

-Coriander can grow indoors, but unlike the other herbs, it doesn't like full sun in the middle of the day. If you have a south facing kitchen window, this isn't the place for it. Although not as thirsty as basil, coriander doesn't like dry soil so don’t forget to water it! Cut coriander is best stored in the fridge.",Holly Foat,articles/give-it-a-go-and-grow-your-own-herbs,home-grown-herbs.jpg,"Fresh cut herbs including mint, parsley, thyme and dill","Grow your own,Seasonal,Herbs" +Coriander can grow indoors, but unlike the other herbs, it doesn't like full sun in the middle of the day. If you have a south facing kitchen window, this isn't the place for it. Although not as thirsty as basil, coriander doesn't like dry soil so don’t forget to water it! Cut coriander is best stored in the fridge.",Holly Foat,articles/give-it-a-go-and-grow-your-own-herbs,home-grown-herbs.jpg,"Fresh cut herbs including mint, parsley, thyme and dill","Grow your own,Seasonal,Herbs" The real deal for supermarket savvy shopping,"This may not surprise you - but your supermarket is a hot bed of marketing mayhem, designed to improve their profit and to encourage the consumer to spend more than they intended. The tricks that all supermarkets employ are sometimes sensible ploys that any retailer should do to improve sales - but some may be more subtle and less obvious than you might think. With consumer awareness articles and documentaries frequently picking up on this topic, it’s likely the case that retailers find it harder to get away with the more obvious ploys. We are becoming ever more savvy consumers and there’s probably not a great deal that gets past us. But here’s a few retail tricks to keep in mind when you are rushing around the weekly supermarket stock-up. @@ -54,7 +54,7 @@ The cheapest products in a supermarket are almost always positioned on the bottom of the shelving where you’ll need to bend over to pick it up. You also may not be able to easily read the price ticket. Most people will shop on the middle rows because it is easier and often quicker. These are where the highest profit items are kept and they are the ones the supermarkets want you to buy. -The layout, the music, the colours and the product types are all decided based on principles laid down by industry experts on people - psychologists and behavioural experts who know how we think. And so the savvy shopper will certainly be able to take advantage of great deals in their weekly shop, but it takes a little time and effort just to be more aware of what we are being encouraged to reach for in the aisles.",Megan Collins Quinlan,articles/the-real-deal-for-supermarket-savvy-shopping,supermarket-savvy-umami.jpg,Products presented on supermarket shelving.,"Supermarkets,Shopping" +The layout, the music, the colours and the product types are all decided based on principles laid down by industry experts on people - psychologists and behavioural experts who know how we think. And so the savvy shopper will certainly be able to take advantage of great deals in their weekly shop, but it takes a little time and effort just to be more aware of what we are being encouraged to reach for in the aisles.",Megan Collins Quinlan,articles/the-real-deal-for-supermarket-savvy-shopping,supermarket-savvy-umami.jpg,Products presented on supermarket shelving.,"Supermarkets,Shopping" The umami guide to our favourite mushrooms,"We think mushrooms are one of the most enjoyable ingredients to cook with. There are plenty of edible varieties to try, each with their own distinctive shape, size and taste. And with curious names such as chanterelle, the gypsy, horn of plenty or hen of the woods, who wouldn't want to know more about cooking with the mighty mushroom? One of the best things about mushrooms is their versatility. They can be fried, roasted, grilled, steamed or even cooked in the microwave, and they can be served as the main ingredient for a dish, or simply added as part of the mix. This makes mushrooms an ideal choice for creating absolutely delicious vegetarian dishes. @@ -67,7 +67,7 @@ The brown morel offers a meaty and distinctive flavour and you'll probably love how extraordinary they look in a meal. The morel is a more popular mushroom during the spring, when their availability is high. -For delicacy try the enoki with its tiny white heads that grow in a bunch. These can even be eaten raw in salads. Finally, you can choose the popular oyster mushroom. They are named thus because they look nothing like a mushroom and resemble the innards of an oyster and their sweet flavour is delicious.",Umami,articles/the-umami-guide-to-our-favourite-mushrooms,mushrooms-umami.jpg,A delightful selection of mushroom varieties laid out on a simple wooden plate.,"Mushrooms,Vegetarian" +For delicacy try the enoki with its tiny white heads that grow in a bunch. These can even be eaten raw in salads. Finally, you can choose the popular oyster mushroom. They are named thus because they look nothing like a mushroom and resemble the innards of an oyster and their sweet flavour is delicious.",Umami,articles/the-umami-guide-to-our-favourite-mushrooms,mushrooms-umami.jpg,A delightful selection of mushroom varieties laid out on a simple wooden plate.,"Mushrooms,Vegetarian" Let's hear it for carrots,"Let's hear it for the humble carrot! This sweet and healthy ‘everyday’ veg packs it all in. Great flavour, fantastic colour, and if you're one for believing the old story, they can even help you to see better in the dark. Who doesn't love cooking with this super versatile root veg? We roast them, boil them, blend them into soups and grate them into salads. The humble carrot has to be one of our favourite veg choices and it's been grown for thousands of years. But back then you were more likely to find a purple, red, yellow or white carrot and not the orange one we are all so familiar with today. diff -u b/core/profiles/demo_umami/demo_umami_content/default_content/recipes.csv b/core/profiles/demo_umami/demo_umami_content/default_content/recipes.csv --- b/core/profiles/demo_umami/demo_umami_content/default_content/recipes.csv +++ b/core/profiles/demo_umami/demo_umami_content/default_content/recipes.csv @@ -1,8 +1,8 @@ -title,image,alt,summary,author,recipe_category,preparation_time,cooking_time,total_time,difficulty,ingredients,recipe_instruction,number_of_servings,tags,slug -Deep mediterranean quiche,mediterranean-quiche-umami.jpg,"A delicious deep layered Mediterranean quiche, sliced.",An Italian inspired quiche with sun dried tomatoes and courgette. A perfect light meal for a summer's day.,Umami,Main course,40,30,70,medium,"For the pastry:,280g plain flour,140g butter,Cold water,For the filling:,1 onion (chopped),2 cloves of garlic (chopped),Half courgette (chopped),450ml soya milk,500g grated parmesan,2 eggs,200g sun dried tomatoes,100g feta","
  1. Preheat the oven to 200C. Starting with the pastry; rub the flour and butter together in a bowl until crumbling like breadcrumbs. Add water, a little at a time, until it forms a dough.
  2. Roll out the pastry on a floured board and gently spread over your tin. Place in the fridge for 20 minutes before blind baking for a further 10.
  3. Whilst the pastry is cooling, gently cook the onions, garlic and courgette.
  4. In a large bowl, add the soya milk, half the parmesan, and the eggs. Gently mix.
  5. Once the pastry is cooked, spread the onions, garlic and sun dried tomatoes over the base and pour the eggs mix over. Sprinkle the remaining parmesan and careful lay the feta over the top. Bake for 30 minutes or until golden brown.
",8,"Pastry,Egg",recipes/deep-mediterranean-quiche -Vegan chocolate brownies,chocolate-brownie-umami.jpg,A plate with a vegan chocolate brownie covered in dark vegan chocolate,These sumptuous brownies should be gooey on the inside and crisp on the outside. A perfect indulgence!,Umami,Snack,20,20,40,,"170g self-raising flour, 3 tablespoons of cocoa powder, 170g of caster sugar, 5 tablespoons of vegetable oil, 1 teaspoon vanilla extract, A pinch of salt, 230ml soy milk","
  1. Preheat the oven to 180C and grease a 8 inch cake tin.
  2. Sift the flour and cocoa powder into a bowl and add the sugar and salt.
  3. Add the oil, a little at time, mixing well to avoid lumps. Add the soy milk and vanilla extract and mix thoroughly.
  4. Gently pour into the cake tin and spread out until even. Bake for about 15 minutes and check with a knife (the knife should come out clean when inserted into the brownies 2cm from the edge).
  5. Allow to cool in the tin for a few minutes before cooling on a wire rack.
",8,,recipes/vegan-chocolate-brownies -Super easy vegetarian pasta bake,veggie-pasta-bake-umami.jpg,Cheesy pasta dish with vegetarian sausages and topped with Mozzarella,A wholesome pasta bake is the ultimate comfort food. This delicious bake is super quick to prepare and an ideal midweek meal for all the family.,Umami,Main course,5,20,25,easy,"400g wholewheat pasta, 1 chopped onion, 2 cloves of garlic, 1 pack of vegetarian sausages, 1 tin of chopped tomatoes, 50g of sliced sun dried tomatoes, Pinch of sugar, 3 tablespoons of red pesto, 50g cheddar cheese, Basil or mixed herbs, 100g mozzarella","
  1. In a large pan, boil the pasta in plenty of water until cooked.
  2. Whilst the pasta is cooking, gently fry the onions and garlic in a little oil until soft and the onion looks clear.
  3. Add the vegetarian sausages. Once browned, remove and chop into chunky bites.
  4. Pop the sausages back into the pan and add the tomatoes, sugar, pesto and sun dried tomatoes. Season to taste. Simmer until most of the water from the chopped tomatoes has gone.
  5. Drain the pasta and add to the pan with the sausages and tomatoes. Stir in half of the cheddar and transfer to a shallow dish. Sprinkle with the rest of the cheddar and dot the sliced mozzarella over the top.
  6. Grill for 10 minutes or the cheese as melted and started to brown. Serve with basil leaves.
",4,"Vegetarian,Pasta,Baked",recipes/super-easy-vegetarian-pasta-bake -Watercress soup,watercress-soup-umami.jpg,Light and simply presented watercress soup with a sprig of coriander to finish,"A wonderfully simple and light soup, making the most of seasonal, local produce. ",Umami,Starter,10,20,30,easy,"3 bunches of watercress,3 potatoes,3 onions,2 leeks,800ml stock,5 tablespoons of crème fraîche","
  1. Prepare the vegetables by peeling and chopping the potatoes, finely chopping the onions, leeks and garlic.
  2. Heat a little oil in a pan and add the chopped vegetables, gently cooking them for about 5 minutes.
  3. Add the vegetable stock to the same pan and turn up the heat until simmering, adding the watercress after about 10 minutes. Cook until all the vegetables are soft and easily mashed.
  4. Liquidize the soup either with a hand blender or in a mixer, until smooth.
  5. If the soup has cooled too much whilst being liquidized, stir in the crème fraîche and reheat before serving (otherwise serve straight away). Season to taste.
",4,"Soup,Vegetarian",recipes/watercress-soup -Victoria sponge cake,victoria-sponge-umami.jpg,"A classic, uncut Victoria sponge with a deep filling of butter cream and jam","A traditional Victoria sponge cake, perfect for any afternoon with a cup of tea.",Umami,Desert,20,20,40,easy,"225g butter or margarine,225g caster sugar,225g self-raising flour,4 eggs,1 level teaspoon of baking powder,3 tablespoons of jam for the filling,Icing sugar to dust the top,Cream to serve","
  1. Preheat the oven to 180C and grease two 8 inch cake tins.
  2. In a large bowl, mix the butter and sugar together, then add the eggs, flour and baking powder.
  3. Spread the mix evenly between the 2 cake tins.
  4. Place both tins in the middle of the preheated oven for 20 minutes, before checking with a knife. When the knife comes out clean, its ready!
  5. Allow to cool in the tins before moving them onto a cooling rack.
  6. Add the jam, stack, dust with icing sugar and serve with a big dollop of cream. Enjoy!
",10,Cake,recipes/victoria-sponge-cake -Gluten free pizza,pizza-umami.jpg,"Olives, basil and mozzarella top a gluten free pizza base","A gorgeous and simple gluten free pizza, with deliciously indulgent mozzeralla and Parma ham. Can easily be vegetarian by leaving out the ham.",Umami,Main course,15,15,30,,"400g gluten free flour, 125ml warm water, 125ml milk, 1 sachet of dried yeast, 2 teaspoons of sugar, 1 teaspoons of salt, 2 tablespoons olive oil, 4 tablespoons of tomato puree, 1 clove of garlic, Some fresh basil, 200g of mozzarella, 100g rocket, 5 slices of Parma ham","
  1. Preheat the oven to 220C. Mix the some of the milk and water in a jug, and add the yeast and sugar, then set aside.
  2. In a bowl, mix the flour, salt and oil. Slowly add the liquid from the jug and form into a dough.
  3. Break the dough in half and shape into two pizza bases. Set aside for about 15 minutes, whilst making the topping.
  4. Spread the tomato puree over the pizza bases, chop the basil and rocket and sprinkle over the tomato. Lay the chopped Parma ham on top and add thick slices of mozzarella across the pizza.
  5. Cook in the oven directly on the top shelf (with a tray underneath) for 10-12 minutes until the mozzarella is bubbling. Season with salt and pepper and serve.
",4,,recipes/gluten-free-pizza +title,image,alt,summary,author,recipe_category,preparation_time,cooking_time,total_time,difficulty,ingredients,recipe_instruction,number_of_servings,tags,slug +Deep mediterranean quiche,mediterranean-quiche-umami.jpg,"A delicious deep layered Mediterranean quiche, sliced.",An Italian inspired quiche with sun dried tomatoes and courgette. A perfect light meal for a summer's day.,Umami,Main course,40,30,70,medium,"For the pastry:,280g plain flour,140g butter,Cold water,For the filling:,1 onion (chopped),2 cloves of garlic (chopped),Half courgette (chopped),450ml soya milk,500g grated parmesan,2 eggs,200g sun dried tomatoes,100g feta","
  1. Preheat the oven to 200C. Starting with the pastry; rub the flour and butter together in a bowl until crumbling like breadcrumbs. Add water, a little at a time, until it forms a dough.
  2. Roll out the pastry on a floured board and gently spread over your tin. Place in the fridge for 20 minutes before blind baking for a further 10.
  3. Whilst the pastry is cooling, gently cook the onions, garlic and courgette.
  4. In a large bowl, add the soya milk, half the parmesan, and the eggs. Gently mix.
  5. Once the pastry is cooked, spread the onions, garlic and sun dried tomatoes over the base and pour the eggs mix over. Sprinkle the remaining parmesan and careful lay the feta over the top. Bake for 30 minutes or until golden brown.
",8,"Pastry,Egg",recipes/deep-mediterranean-quiche +Vegan chocolate brownies,chocolate-brownie-umami.jpg,A plate with a vegan chocolate brownie covered in dark vegan chocolate,These sumptuous brownies should be gooey on the inside and crisp on the outside. A perfect indulgence!,Umami,Snack,20,20,40,,"170g self-raising flour, 3 tablespoons of cocoa powder, 170g of caster sugar, 5 tablespoons of vegetable oil, 1 teaspoon vanilla extract, A pinch of salt, 230ml soy milk","
  1. Preheat the oven to 180C and grease a 8 inch cake tin.
  2. Sift the flour and cocoa powder into a bowl and add the sugar and salt.
  3. Add the oil, a little at time, mixing well to avoid lumps. Add the soy milk and vanilla extract and mix thoroughly.
  4. Gently pour into the cake tin and spread out until even. Bake for about 15 minutes and check with a knife (the knife should come out clean when inserted into the brownies 2cm from the edge).
  5. Allow to cool in the tin for a few minutes before cooling on a wire rack.
",8,,recipes/vegan-chocolate-brownies +Super easy vegetarian pasta bake,veggie-pasta-bake-umami.jpg,Cheesy pasta dish with vegetarian sausages and topped with Mozzarella,A wholesome pasta bake is the ultimate comfort food. This delicious bake is super quick to prepare and an ideal midweek meal for all the family.,Umami,Main course,5,20,25,easy,"400g wholewheat pasta, 1 chopped onion, 2 cloves of garlic, 1 pack of vegetarian sausages, 1 tin of chopped tomatoes, 50g of sliced sun dried tomatoes, Pinch of sugar, 3 tablespoons of red pesto, 50g cheddar cheese, Basil or mixed herbs, 100g mozzarella","
  1. In a large pan, boil the pasta in plenty of water until cooked.
  2. Whilst the pasta is cooking, gently fry the onions and garlic in a little oil until soft and the onion looks clear.
  3. Add the vegetarian sausages. Once browned, remove and chop into chunky bites.
  4. Pop the sausages back into the pan and add the tomatoes, sugar, pesto and sun dried tomatoes. Season to taste. Simmer until most of the water from the chopped tomatoes has gone.
  5. Drain the pasta and add to the pan with the sausages and tomatoes. Stir in half of the cheddar and transfer to a shallow dish. Sprinkle with the rest of the cheddar and dot the sliced mozzarella over the top.
  6. Grill for 10 minutes or the cheese as melted and started to brown. Serve with basil leaves.
",4,"Vegetarian,Pasta,Baked",recipes/super-easy-vegetarian-pasta-bake +Watercress soup,watercress-soup-umami.jpg,Light and simply presented watercress soup with a sprig of coriander to finish,"A wonderfully simple and light soup, making the most of seasonal, local produce. ",Umami,Starter,10,20,30,easy,"3 bunches of watercress,3 potatoes,3 onions,2 leeks,800ml stock,5 tablespoons of crème fraîche","
  1. Prepare the vegetables by peeling and chopping the potatoes, finely chopping the onions, leeks and garlic.
  2. Heat a little oil in a pan and add the chopped vegetables, gently cooking them for about 5 minutes.
  3. Add the vegetable stock to the same pan and turn up the heat until simmering, adding the watercress after about 10 minutes. Cook until all the vegetables are soft and easily mashed.
  4. Liquidize the soup either with a hand blender or in a mixer, until smooth.
  5. If the soup has cooled too much whilst being liquidized, stir in the crème fraîche and reheat before serving (otherwise serve straight away). Season to taste.
",4,"Soup,Vegetarian",recipes/watercress-soup +Victoria sponge cake,victoria-sponge-umami.jpg,"A classic, uncut Victoria sponge with a deep filling of butter cream and jam","A traditional Victoria sponge cake, perfect for any afternoon with a cup of tea.",Umami,Desert,20,20,40,easy,"225g butter or margarine,225g caster sugar,225g self-raising flour,4 eggs,1 level teaspoon of baking powder,3 tablespoons of jam for the filling,Icing sugar to dust the top,Cream to serve","
  1. Preheat the oven to 180C and grease two 8 inch cake tins.
  2. In a large bowl, mix the butter and sugar together, then add the eggs, flour and baking powder.
  3. Spread the mix evenly between the 2 cake tins.
  4. Place both tins in the middle of the preheated oven for 20 minutes, before checking with a knife. When the knife comes out clean, its ready!
  5. Allow to cool in the tins before moving them onto a cooling rack.
  6. Add the jam, stack, dust with icing sugar and serve with a big dollop of cream. Enjoy!
",10,Cake,recipes/victoria-sponge-cake +Gluten free pizza,pizza-umami.jpg,"Olives, basil and mozzarella top a gluten free pizza base","A gorgeous and simple gluten free pizza, with deliciously indulgent mozzeralla and Parma ham. Can easily be vegetarian by leaving out the ham.",Umami,Main course,15,15,30,,"400g gluten free flour, 125ml warm water, 125ml milk, 1 sachet of dried yeast, 2 teaspoons of sugar, 1 teaspoons of salt, 2 tablespoons olive oil, 4 tablespoons of tomato puree, 1 clove of garlic, Some fresh basil, 200g of mozzarella, 100g rocket, 5 slices of Parma ham","
  1. Preheat the oven to 220C. Mix the some of the milk and water in a jug, and add the yeast and sugar, then set aside.
  2. In a bowl, mix the flour, salt and oil. Slowly add the liquid from the jug and form into a dough.
  3. Break the dough in half and shape into two pizza bases. Set aside for about 15 minutes, whilst making the topping.
  4. Spread the tomato puree over the pizza bases, chop the basil and rocket and sprinkle over the tomato. Lay the chopped Parma ham on top and add thick slices of mozzarella across the pizza.
  5. Cook in the oven directly on the top shelf (with a tray underneath) for 10-12 minutes until the mozzarella is bubbling. Season with salt and pepper and serve.
",4,,recipes/gluten-free-pizza Thai green curry,thai-green-curry-umami.jpg,"A traditional bowl of creamy, aromatic Thai green curry with chunks of chicken and a small bowl of jasmine rice.",A quick and easy version of the classic Thai green curry. Perfect for a midweek meal!,Umami,Main course,10,15,25,,"400g coconut milk, 400g chicken or tofu, 1 tablespoon of Thai green curry paste, 1 clove of garlic, 2 teaspoons of fish sauce, 400g mushrooms, 200g green beans, Fresh coriander leaves, Jasmine rice","
  1. In a large wok, brown the chicken until golden, then turn the heat down and gently cook the garlic. Add the chopped green beans and stir.
  2. Add the coconut milk, green curry paste and fish sauce. Mix well and slowly simmer.
  3. Add the chopped mushrooms and simmer until the chicken (or tofu) is cooked.
  4. Serve with jasmine rice and a sprinkle of coriander.
",4,,recipes/thai-green-curry \ No newline at end of file diff -u b/core/profiles/demo_umami/demo_umami_content/src/InstallHelper.php b/core/profiles/demo_umami/demo_umami_content/src/InstallHelper.php --- b/core/profiles/demo_umami/demo_umami_content/src/InstallHelper.php +++ b/core/profiles/demo_umami/demo_umami_content/src/InstallHelper.php @@ -5,6 +5,7 @@ use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Path\AliasManagerInterface; use Drupal\Core\State\StateInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Component\Utility\Html; @@ -15,6 +16,13 @@ class InstallHelper implements ContainerInjectionInterface { /** + * The path alias manager. + * + * @var \Drupal\Core\Path\AliasManagerInterface + */ + protected $aliasManager; + + /** * Entity type manager. * * @var \Drupal\Core\Entity\EntityTypeManagerInterface @@ -38,6 +46,8 @@ /** * Constructs a new InstallHelper object. * + * @param \Drupal\Core\Path\AliasManagerInterface $aliasManager + * The path alias manager. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager * Entity type manager. * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler @@ -45,7 +55,8 @@ * @param \Drupal\Core\State\StateInterface $state * State service. */ - public function __construct(EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, StateInterface $state) { + public function __construct(AliasManagerInterface $aliasManager, EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, StateInterface $state) { + $this->aliasManager = $aliasManager; $this->entityTypeManager = $entityTypeManager; $this->moduleHandler = $moduleHandler; $this->state = $state; @@ -56,6 +67,7 @@ */ public static function create(ContainerInterface $container) { return new static( + $container->get('path.alias_manager'), $container->get('entity_type.manager'), $container->get('module_handler'), $container->get('state') @@ -275,7 +287,7 @@ 'uri' => 'internal:' . call_user_func(function () { $nodes = $this->entityTypeManager->getStorage('node')->loadByProperties(['title' => 'Super easy vegetarian pasta bake']); $node = reset($nodes); - return $node->toUrl()->toString(); + return $this->aliasManager->getAliasByPath('/node/' . $node->id()); }), 'title' => 'Super easy vegetarian pasta bake', ],