First combine the flour, ground hazelnuts, icing sugar, lemon zest, cinnamon and a few gratings of whole nutmeg in a mixing bowl, then rub in the butter until the mixture is crumbly.
Stir in the egg yolks and form the mixture into a dough, then place it in a polythene bag and leave it in the fridge for 20 minutes to rest.
Pre-heat the oven to gas mark 5, 375°F (190°C) and pop the baking tray in to heat at the same time. Next, weigh a 5 oz (150 g) piece of the pastry dough and put it on one side. Then roll out the rest of the pastry on a lightly floured surface to a 10 inch (25.5 cm) round. Transfer this to the tin and, using your fingers, gradually ease the pastry up the side of the tin so that it stands up about 1/4 inch (5 mm) above the edge all around.
Next, for the filling, mix the jellied cranberry sauce or jelly with the lemon juice and spoon all but 2 tablespoons on to the pastry, smoothing it out evenly to the edge. Use the rest of the dough to make a lattice-work pattern on the top, with strips about 1/4 inch (5 mm) wide. Then go round the pastry edge with a fork, turning it over inside the edge of the tin to give about a ½ inch (1 cm) border all round.
Place the tin on the pre-heated baking tray and bake on a high shelf for 30 minutes, or until the pastry is golden brown. Sift icing sugar over the top and serve the torte warm or cold with whipped cream.