Hello
-Indesign CS2-
I have a footer that is made of the pagenumber, a line and the heading of the chapter
It should look like this::

12___________________First Chapter

But if the page number or the heading are longer or shorter than the default size of the textbox in the template, the text is
compressed or theres too much space. E.g It looks like this
1 __________________ Chapter

Is there any way to adapt automatically the length of the line and the size of the textbox?
Or do I have to make a new template for every chapter with a new heading?
Thank you very much for the help!!
ciao
MIchael