The tomato sauce is made first, because it has to be left to cool. Heat the oil in a pan, add the onion and garlic and gently fry for about 5 minutes until softened.
Add the tomatoes, tomato puree, herbs, sugar and seasoning. Simmer, uncovered, stirring for 15 to 20 mins or until the tomatoes have reduced to a thick pulp. Leave to cool.
Preheat the oven to 200 C / Gas 6. Cut the baguettes in half lengthways and toast the cut sides until crisp and golden.
Spread the tomato sauce over the toasted baguettes.
Cut the ham into strips and arrange on the baguettes with the pineapple and pepper. Season. Sprinkle the grated cheese on top.