One (only if i'm in thread_view) for an answer button and one button to share this page (but if i'm on page 2 of a thread the $url variable still contains just the thread url without the page parameter). That's where i need the $url
Ah, missed the part where you mentioned what template. Could use an add-on to add to the view params and combine it with an if statement. I'd imagine there's an easier solution though, combination of an if statement and the URL route.