How to edit a collection page for different collections accordingly?

Hello,

I am making a top product or products ranking display which should be placed on the left side of each collection page. Since different collections have different products how can I edit the code so that different collections show different data. Even how can I edit the code so that different collection show a different style.

Also, how can I edit the code for different collections through my APP? Do I have to create a single template or do I have to create separate filters?

Thanks