Dynamically select the correct item for theme based on template