This project is read-only.

How to get the GUID of the page being served?

Topics: Controls
Apr 20, 2010 at 8:18 PM
I'm trying to create a page list that contains just the child pages of the current page being served. I've used the PageMenu.cs file from DarkBlog to kickstart my efforts. It starts with a call to GetChildren passing an empty GUID. I want to start by calling GetChildren with something like CurrentPage.Id. How can I do that? Thanks, Mark
Apr 20, 2010 at 9:34 PM

Ok, I figured out how to use the Page.Serving event.  The only problem is that the first page gets served before the event is registered.  Once registered it works exactly as desired, but it seems like the first pass into the site the user is going to get an empty sub page list unless I can figure out how to get the Home page.

Apr 20, 2010 at 9:41 PM

bingo!  BlogEngine.Core.Page.GetFrontPage()


BlogEngine isn't half bad.  With these couple of mods we plan to use it as a CMS.