Difference between NodeID and PageID

Alexander Toups asked on August 4, 2015 13:43

Can anybody tell me about the difference between pageID and nodeID? I'm looking for an attribute to directly redirect to. At first I thought about looking up the URL of a page by its nodeID. Now I saw there is an attribute called pageID. I wonder what's the difference.

What I'm looking for is a value the will not change over the life cycle of a document, even when the document is moved to another section of the document tree.

Correct Answer

Virgil Carroll answered on August 4, 2015 15:31

Node ID is the location in the content tree on an individual site. It is used by Kentico as a positional identifier in the pages content tree. Page ID is a unique identifier for the Page Type itself.

In a re-usable content scenario you could re-use a page in multiple locations on a site. Each page would have the same page ID but each location would have a different Node ID. For a redirect you would want to use Node ID (or GUID)

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on August 4, 2015 15:29

You want to use the NodeID as there are many API references which allow you to get documents from this value. The NodeID remains the same no matter where you place it. The NodeLevel and ParentNodeID change based on where you place the document in the tree.

My suggestion is to use the NodeAliasPath to redirect to. Use the NodeID to look up a page, then use that node's NodeAliasPath.

0 votesVote for this answer Mark as a Correct answer

Alexander Toups answered on August 4, 2015 15:54

Thanks a lot, then node id is the apropriate one.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 5, 2015 02:26

The NodeID is simply an auto-generated integer on a table. It is not unique per site and does not represent a location in the content tree. The combination of atleast the NodeID, NodeLevel and NodeParentID represent the location in the content tree. The NodeID field resides in the CMS_Tree table. The CMS_Tree table holds all the hierarchical data for the content tree, template ID and structure of the pages on the site.

The PageID is actually the DocumentID field that resides in the CMS_Document table and again, is an auto-generated integer on that table. The CMS_Document table stores the editable text and image data (for those webparts), metadata, style information for the navigation if you choose to enter it, latest version and workflow information, etc.

Only in the event that you create a linked page will the Page ID be the same on both instances. Even if you copy a page to a different location, they will still be different Page ID's

Hope this clarifies things a bit more.

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.