0

how can I setup all items display name in English in Sitecore Gutter.

1 Answer 1

0

Sitecore does not provide this functionality OOTB but we can create a custom Sitecore Gutter, also known as a quick action bar.

You need to follow the below steps -

  • Create a class that inherits the GutterRenderer.

  • Override the GutterIconDescriptor method in the GutterRenderer class, to set the appropriate icons to the gutter.

    public class GutterItemDisplayName : GutterRenderer
     {
         //Example code
         protected override GutterIconDescriptor GetIconDescriptor(Item item)
         {
             String displayName = GetDisplayName(item);
             GutterIconDescriptor descriptor = new GutterIconDescriptor();
    
                 descriptor.Icon = "Applications/32x32/document_ok.png";//Icon to show in Gutter
                 descriptor.Tooltip = "Items display name is "+ displayName; //Tooltip will show item display name
                 descriptor.Click = //Any action you want to add for the item;
                 return descriptor;
    
         }
     }
    
  • Create Custom Gutter in core database under /sitecore/content/Applications/Content Editor/Gutters using this template- /sitecore/templates/Sitecore Client/Content editor/Gutter Renderer

  • Populate the Header and Type fields of the Gutter, Header field should contain the name you want to give to the Gutter, Type field should contain the fully qualified class name, the dll which contains the class.

enter image description here

7
  • Thank you, I will want to have all display items to be automatically used English version. Jul 4, 2022 at 7:16
  • I mean this section on other language version must be always on English: Display name - Is shown in the content editor Jul 6, 2022 at 11:17
  • @eratosten123 In the GetDisplayName function, you need to find the Display name for the English language. correct me if I am understand your requirement incorrect here Jul 6, 2022 at 11:40
  • Ok, I will try like that Jul 6, 2022 at 12:08
  • I mean I need that for site tree Jul 6, 2022 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.