Thanks for the reply Nikola. I'll check out your suggestions, but I ended up getting it working using ParentPage.NavigationNodeId like this:
PageManager linkedPageManager = PageManager.GetManager();
PageNode linkedPageItem = linkedPageManager.GetPageNodes().FirstOrDefault(p => p.Id == page.ParentPage.NavigationNodeId);
... can you see any problems with this approach? It seems to be working fine for what I need, but am not sure if there are scenario's where this will fail (?)
Hi, I'm also trying to register an event and use the publish event to trigger some custom code. I've used this article to register my event: www.sitefinity.com/.../what-event-is-raised-when-a-page-is-published-and-how-do-i-capture-it
However, I'm not sure how I can get the page URL of the page thats being published. Can someone provide sample code on how to retrieve the page URL of the page thats being published when the publish event is triggered?