London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Per Nergård (MVP)
Sep 17, 2010
  4221
(0 votes)

Defaulting the editor to the favourites tab in edit mode

I have customers that have expressed a wish that when a editor enters edit mode the favourites tab should be the default instead of showing the page tree.

I found a post by Allan Thraen which added an extra row to the context menu with using a PagePlugIn but I didn’t get it to work.

So I ended up with adding some code to the onload method in my own pagetemplate class which inherits from TemplatePage, modyfying the url for the editmode option.

 

   1: if (ContextMenu.IsMenuEnabled)
   2:       {
   3:           RightClickMenuItem item = null;
   4:  
   5:           item = EPiServer.Web.PageExtensions.ContextMenu.Current.Menu.Items["EditMode"];
   6:           if (item != null)
   7:           {
   8:  
   9:               item.Url += "%26tabid=1";
  10:           }
  11:       }
Sep 17, 2010

Comments

Deane Barker
Deane Barker Sep 21, 2010 10:33 AM

So many times, I've thought I should try this. Nicely done.

Please login to comment.
Latest blogs
Display page/block thumbnail based on selected site in multi-site solution

In previous blog we described how to control the visibility of the blocks or properties based on the current site in multisite solution. We can use...

Tomek Juranek | May 16, 2025

Understanding the Infrastructure Powering AI Agents for Marketing

The marketing world is increasingly captivated by the potential of AI agents. However, it's crucial to recognize that these agents are not simply...

Patrick Lam | May 15, 2025

Meet the Newest OMVPs – Winter 2025 Cohort

We're excited to officially welcome the latest winter cohort of Optimizely Most Valuable Professionals (OMVPs) - a group of passionate tech...

Satata Satez | May 14, 2025

Helper method to encode query string properly

When using Url.ContentUrl() in Optimizely 12, encodes spaces as + in the query string. If you want to encode the spaces as %20, use the below helpe...

sunylcumar | May 13, 2025