Peel brown outer layers from an onion. Using a sharp knife cut a cone-shaped core from the top of the onion, about 2/3 of the way into the vegetable. The core should be about 4cm wide at the top.
Insert a stock cube into the hollowed-out space followed by an ice cube (for more moisture, if desired). Top the ice cube with 1 tablespoon of butter. Wrap the filled onion in a sheet of aluminium foil, leaving a small vent at the top. Repeat with the rest of the onions and filling ingredients.
Set the foil-wrapped onions on the preheated barbecue vent-sides up and cook until onions are tender, 20 to 30 minutes.