roof rail trim

Okay, I am getting ready to put the roof rail trim on my 72 dart and need some advice on the best way to do the foam that goes between the roof and the trim. Do I attach the foam to the roof first then put up the trim or vice versa attach the foam to the trim first?
Now the second question about the inside roof rail trim clips and which way they go and how many do I use, it has been 6 years since I took them off and can't seem to remember how they go. Thanks in advance for any help that you can give me.