Method for accessing an unpublished page address Options
chimnit
Posted: Friday, February 01, 2008 1:43:14 AM
Rank: Devotee

Joined: 10/25/2007
Posts: 56
Hi everybody

Do any of you know if there is a method in the API that retrieves the address of an unpublished page, like the page-preview button in the backend????

I need the address for a control for the backend, that needs the un-published address.

Thank you all in advance

Kim
chimnit
Posted: Monday, February 04, 2008 7:20:43 PM
Rank: Devotee

Joined: 10/25/2007
Posts: 56
Hi again,

I have tried to use the following lines of code to access the node, in which the control is located in the backend, but they throw an exception:

Code:
Node currentNode = Node.GetCurrent();
litBannerText.Text = currentNode.Name;


Following is the exception:

Code:
[NullReferenceException: Object reference not set to an instance of an object.]
   umbraco.presentation.nodeFactory.Node.GetCurrent() +64
   umbracoControls.FlashBanner.Page_Load(Object sender, EventArgs e) +167


Can anybody help???

Thanks in advance :o)

Kim
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.