-2

So the below code works perfectly fine for the front-end however always returns null/0 in the back-office when rendered within the grid.

This code is within a custom grid editor.

int pageid = Convert.ToInt32(UmbracoContext.Current.PageId);

How can I make it work from backoffice to?

1 Answers1

0

Just in case anyone needs the answer I used the following:

var currentcontent = Lecoati.LeBlender.Extension.Helper.GetCurrentContent();

Answer was found on an Umbraco forum post which you can find here.