[3.8] Enhance code for homepage customization