Committing code for set the width dynamically of the template.

refs #31462