Trouble making dynamics links I have two dynamic links that I want to put in a block, e.g. http://example.com/series/bomberman-jetters/node/add/gallery/82 ("series" is the content type, and "bomberman jetters" is the node title), http://example.com/series/bomberman-jetters/node/add/reivew/82 ("82" is the node ID).

I want to change the URL depending on what node is being viewed. Like if it's viewing node 99 then the links in the block should be changed to http://example.com/series/bomberman-jetters/node/add/gallery/99.

So what I did is insert &lt;?php
print "&lt;a href='#overlay=node/add/review/" . arg(1) . "'&gt;Add album&lt;/a&gt;";
?&gt; but it doesn't work in Drupal 7. The link is correct but it doesn't lead you to creating the node.
Your link code worked for me when I tried it on a random page so it's hard to tell what could be wrong from the information you provided. Generally a better way for creating links in code would be the l function:

&lt;?php print l(t('Add album'), 'node/add/review/' . arg(1)); ?&gt;


Drupal will handle the use of admin overlay automatically if it's enabled. Another thing I noticed is that adding arg(1) for nid at the end of node creation pages serves no purpose generally. If it's used by a module or custom code for something then it's a different story though.