Preheat oven to 200ºC (180ºC for fan assisted ovens)/Gas Mark 6.
Unroll the pastry sheet and cut into four equal rectangles, place on a lined baking sheet and spread each with the red onion marmalade, leaving a small border all round.
Top with the nuts and cheese and brush the borders with the beaten egg.
Bring up the borders to form an edge around the filling, pinch to hold in place and brush again with the beaten egg. Scatter a little thyme over the tops and bake for 10 – 12 minutes until the pastry is golden brown and the cheese just melting.