I know the node title from the URL.
I need to get the node nid for views argument.
How do I do that?
I am using PHP argument code.

Comments

andrew_hoffi’s picture

Just wondering if you got anywhere with this issue? I've ran into the same problem, I have the nid, but its sitting in page.tpl.php and I can not get it across to the view. Here's the code I have used in the theme

$tempnodes = db_query("SELECT nid FROM node WHERE lcase(title) = '".str_replace('-',' ',strtolower(arg(1)))."' AND type = 'project' AND node.status = 1 AND language = '".UI_lang()."' ");
$tempnode = db_fetch_object($tempnodes);
		
$AssociatedProject = node_load($tempnode->nid);		

Thanks
Andrew
-------------------
www.hoffi.com