Improved the handling of theme pages
Merge pull request #4321 from LaurentGoderre/improvements-for-themes

Improved the handling of theme pages