How do I create a dynamic link for a block?
You can get the node id from the url, since all nodes are displayed at node/[nid]. So if you in your block do

$nid = arg(1);
$node = node_load($nid);


You will get the node which has the title and the nid that you can use in your links. You would need to check that the block is on a node page as well by doing:

if (arg(0) == 'node')