Executive Summary: I need help constructing a url that includes the current nid.
Details: I have a footer in a view as follows:
<a href="/node/add/task">Add task.</a> <hr> Input Format: Filtered HTML
I would like a footer which includes a variable (the current nid) as follows (but this does not work).
<a href="/node/add/task&proj_fill[]=$nid">Add related task.</a> <hr> Input Format: Filtered HTML
I have tried a variety of things, but cannot seem to get it to work. For example, this does not seem to work.
<a href="/node/add/task&proj_fill[]=$nid">Add related task.</a> <hr> Input Format: PHP code
Would you help me construct a url that includes the current nid?
I think I got it with this: <?php if (arg(0) == 'node' && is_numeric(arg(1))) $nodeid = arg(1); echo '<a href="/node/add/task&proj_fill[]=', urlencode($nodeid), '">Add task.</a><hr>'; ?> Input Format: php
By the way, I had disabled the PHP input format, but the input format choice was still there. IMHO, the uninstall of PHP Input Filter should remove the input format it creates with its install.