[ContentBundle,WebBundle] Fix some bad coding practices while displaying
collection for slideshow and menu