How to have a relationship Every intimate relationship I have ever had has ended in a lot of pain and grief. The last one lasted for 17 years but eventually broke down. That was a year ago and the pain is still very raw at times. 
My question is this. If attachment causes suffering then I was obviously very attached but how do you have an intimate relationship without becoming attached? It seems just like the normal human thing to do. You like someone, you fall in love and it hurts when they're gone.
You kind of don't even realise it's happening until it ends and then you feel like you want to die. I'm not sure if it's possible to have a close relationship on the Buddhist path anymore but I also don't want to live life alone. I know Buddha left his family but in these modern times there seem to be plenty of teachers who have partners/spouses.
Impossible. When there's relationship, there's bonding. When there's bonding, there's pain when it ends.

The only thing you can do to minimize pain is to stay as independent as possible, and be your own source of joy and acceptance. Which means playing an active role in your life, instead of relying on your partner for initiative and values.