Hide Admin\Edit Menu for a Particular Web Page in EpiServer CMS 7

Vote:
 
We have Migrated our wen site from Episerver 5.2 R2 to Episerver CMS 7.0, in some pages we have used following code to disable context menu protected override void OnPreInit(EventArgs e) { ContextMenu.IsMenuEnabled = false; base.OnPreInit(e); } After migration it is giving "ContextMenu as null, obeject reference not set to instance of the object" Can ypu please help us how to achive same in Episerver 7 .
#89239
Aug 12, 2014 7:19
Vote:
 

Hi Teller,

In EPi 7 the ContextMenu has been replaced by the QuickNavigator. To render it on your page add @Html.RenderEPiServerQuickNavigator(). Most solutions have this added in the root layout. But in your case I would have a root layout with out one and then a second layout that renders it. That way you can let the pages you don't want to show it on inheret from the root layout and the others from the second one.
 

#89277
Aug 12, 2014 15:13
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.