new render code for lightbox and block