<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: How to get the path of a node from the node ID in Drupal</title> <atom:link href="http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/feed/" rel="self" type="application/rss+xml" /><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/</link> <description>Concerned about Website Construction &#38; SEO</description> <lastBuildDate>Sun, 06 May 2012 04:35:32 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Alon</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-18633</link> <dc:creator>Alon</dc:creator> <pubDate>Sun, 04 Dec 2011 09:12:51 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-18633</guid> <description>Thanks ! was looking for this.</description> <content:encoded><![CDATA[<p>Thanks ! was looking for this.</p> ]]></content:encoded> </item> <item><title>By: Luca</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-16624</link> <dc:creator>Luca</dc:creator> <pubDate>Tue, 25 Oct 2011 13:26:08 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-16624</guid> <description>Thank you!! searching it!</description> <content:encoded><![CDATA[<p>Thank you!! searching it!</p> ]]></content:encoded> </item> <item><title>By: Mossill</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-10059</link> <dc:creator>Mossill</dc:creator> <pubDate>Tue, 17 May 2011 15:08:29 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-10059</guid> <description>Awesome! i was trying to re-build my own url with regular expressions using custom php field in views. this saves alot of time and is efficent. thanks</description> <content:encoded><![CDATA[<p>Awesome! i was trying to re-build my own url with regular expressions using custom php field in views. this saves alot of time and is efficent. thanks</p> ]]></content:encoded> </item> <item><title>By: Milan</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-9238</link> <dc:creator>Milan</dc:creator> <pubDate>Tue, 12 Apr 2011 14:06:42 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-9238</guid> <description>This is working for getting aliases in current language. But when I try to get alias of page in other language (I&#039;m making custom language switch link) it&#039;s not working?
Any idea why?</description> <content:encoded><![CDATA[<p>This is working for getting aliases in current language. But when I try to get alias of page in other language (I&#8217;m making custom language switch link) it&#8217;s not working?<br
/> Any idea why?</p> ]]></content:encoded> </item> <item><title>By: Tajinder Singh</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-4729</link> <dc:creator>Tajinder Singh</dc:creator> <pubDate>Mon, 12 Jul 2010 09:28:52 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-4729</guid> <description>If you are using views, then it is better to use $GLOBALS to access both values.
Otherwise $base_url came blank to me.
print $GLOBALS[&#039;base_url&#039;] . $GLOBALS[&#039;base_path&#039;];
You can further concatenate
drupal_lookup_path(&#039;alias&#039;,&quot;node/&quot;.$data-&gt;nid);
to get complete path to any node.
as
print $GLOBALS[&#039;base_url&#039;] . $GLOBALS[&#039;base_path&#039;] . drupal_lookup_path(&#039;alias&#039;,&quot;node/&quot;.$data-&gt;nid);
Thanks</description> <content:encoded><![CDATA[<p>If you are using views, then it is better to use $GLOBALS to access both values.</p><p>Otherwise $base_url came blank to me.</p><p>print $GLOBALS['base_url'] . $GLOBALS['base_path'];</p><p>You can further concatenate</p><p>drupal_lookup_path(&#8216;alias&#8217;,&#8221;node/&#8221;.$data-&gt;nid);</p><p>to get complete path to any node.</p><p>as</p><p>print $GLOBALS['base_url'] . $GLOBALS['base_path'] . drupal_lookup_path(&#8216;alias&#8217;,&#8221;node/&#8221;.$data-&gt;nid);</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: Julio</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-844</link> <dc:creator>Julio</dc:creator> <pubDate>Mon, 01 Mar 2010 23:17:19 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-844</guid> <description>Thanks for sharing this! I was looking for it and found it very handy.</description> <content:encoded><![CDATA[<p>Thanks for sharing this! I was looking for it and found it very handy.</p> ]]></content:encoded> </item> <item><title>By: Reece</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-422</link> <dc:creator>Reece</dc:creator> <pubDate>Thu, 17 Dec 2009 23:12:22 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-422</guid> <description>also the l() function invokes the drupal_lookup_path function (i think) so if you know the nid and title you could do something like this:
l($node-&gt;title, &#039;node/&#039;.$node-&gt;nid)
which will actually turn it into a nice clean anchor with an aliased path. :D</description> <content:encoded><![CDATA[<p>also the l() function invokes the drupal_lookup_path function (i think) so if you know the nid and title you could do something like this:</p><p>l($node-&gt;title, &#8216;node/&#8217;.$node-&gt;nid)</p><p>which will actually turn it into a nice clean anchor with an aliased path. :D</p> ]]></content:encoded> </item> <item><title>By: David Pratt</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-387</link> <dc:creator>David Pratt</dc:creator> <pubDate>Wed, 09 Dec 2009 21:46:44 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-387</guid> <description>Ah sneaky.  I&#039;ll look into that.</description> <content:encoded><![CDATA[<p>Ah sneaky.  I&#8217;ll look into that.</p> ]]></content:encoded> </item> <item><title>By: Reece Marsland</title><link>http://daipratt.co.uk/how-to-get-the-path-of-a-node-from-the-node-id-in-drupal/comment-page-1/#comment-385</link> <dc:creator>Reece Marsland</dc:creator> <pubDate>Wed, 09 Dec 2009 17:49:36 +0000</pubDate> <guid
isPermaLink="false">http://daipratt.co.uk/?p=750#comment-385</guid> <description>And to make doubly sure you can add the global redirect module (http://drupal.org/project/globalredirect) which will route all non aliased urls to aliased urls (if they exist!) :-)</description> <content:encoded><![CDATA[<p>And to make doubly sure you can add the global redirect module (<a
href="http://drupal.org/project/globalredirect" rel="nofollow">http://drupal.org/project/globalredirect</a>) which will route all non aliased urls to aliased urls (if they exist!) :-)</p> ]]></content:encoded> </item> </channel> </rss>
