sidebar on dynamically added pages

Hi, is there a way I can add a sidebar on dynamically added pages - like, for instance, the shopping cart?