This is a quick tip for Drupal 7 to show how easy it is to see what is the Node ID of a given node if you use the module Pathauto or something else to create alternate URLs for your nodes.
It is quite simple really, but not the most obvious. When you first install Drupal and create nodes (with Clean URLs turned on), your node URLs look like something this: www.example.com/node/1
(1 is in this case the Node ID). But what if you start using path aliases and the URL for Node 1 turns into www.example.com/content/some-title
?
Easy. Go to Content and filter downt to find the content you want to see the Node ID for and hover over the Edit link. Look down to see the hyperlink your browser tells you it will follow if you click on Edit.
There in the link you should see the URL to the node in its original [node/number] form.
Hope this helps!
Daniel Sipos
Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.
Comments
Nice one. I like
Nice one. I like
Thanks
Cool. Thank you.
Thanks, It helps me a lot.
Thanks, It helps me a lot.
Thanks for the post
Thanks for the post
Thank you!
I needed that.
Simpler than Google wants us to believe
i like common-sense answers. Your eyes can cross when you try to find out from Google what to do. And frankly, I'd rather not write any php code just to get a node ID.
Honestly.
Thanks for posting this.
alternatively
On most themes, You could also inspect the body tag, it has few classes, one of them being node-432
Thank You very much!
Thank You very much!
All the best
Thanks alot :)
Thanks alot :)
There is a module for that ;)
https://www.drupal.org/project/shownid displays the nid in the Navbar module
Add new comment