# Dynamically modify the template height

**URL:** <https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [March 25, 2025, 4:15am UTC](https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131 "2025-03-25T04:15:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![770043297](https://avatars.discourse-cdn.com/v4/letter/7/b9bd4f/32.png) [@770043297](https://forum.inductiveautomation.com/u/770043297)\
**Post date:** [March 25, 2025, 4:15am UTC](https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131/1 "2025-03-25T04:15:50Z")

</div>

Can I modify the height expansion display with only one template without re-rendering the template

```python
templateList = event.source.parent.getComponent('Template Repeater').getLoadedTemplates()
  
for template in templateList:
    print template.width, template.height
    
    # It will be restored automatically in about one second after modification!
    template.height = 270

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/5/d561b49acaf3fe66ddb51152c51b9d2aa09f000f.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/290a10bcf51c566b28719ecb8b9487897e133875.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d30cec0af14470a9d34eade64a1dc7216cec339d.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2025, 3:30pm UTC](https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131/2 "2025-03-25T15:30:13Z")

</div>

Your script says template repeater, but your screenshots show a template canvas - which are you actually using?

If you're using a template canvas, and one a new enough version, simply updating the templates dataset to have a new width/height (but be otherwise identical) should resize the individual templates without reloading all templates completely.

---

<div class="post-metadata">

**Author:** ![770043297](https://avatars.discourse-cdn.com/v4/letter/7/b9bd4f/32.png) [@770043297](https://forum.inductiveautomation.com/u/770043297)\
**Post date:** [March 26, 2025, 1:25am UTC](https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131/3 "2025-03-26T01:25:05Z")

</div>

Both templates have this problem, and like the one in the video, the height will automatically recover after a second or so

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 26, 2025, 2:35pm UTC](https://forum.inductiveautomation.com/t/dynamically-modify-the-template-height/104131/4 "2025-03-26T14:35:33Z")

</div>

Yes, the template repeater does its own resizing of instances.

Use a template **canvas** , and in your script, write back to the templates dataset, as I mentioned in the first post.
