template: fix nested show bug while changing page.