Heat the oven to 200c/180c/gas 6. Peel the onions, cut in half fromtopto bottom and thinly slice. Pour 2 tbsp oil into a large frying pan, put on a low hat and cook the onions until soft and golden.
Lightly butter a large shallow ovenproof dish, wash and peel the artichokes but not the potatoes and cut both into roughly 5mm slices.
Using half, place alternate rows of sliced artichoke and potatoes into the dish. Dot with half the garlic and the butter then season and spoon over the onions. Now repeat to form another layer, ending with the onion.