Routing

convert to routing
Maybe better to do 

    $fragment = $deleting ? '' : '#pid' . $this->_post->getId();

to always append a string.