0

In one of my projects in Sitecore 10.2, I am using one base template in other child templates. My requirement is that I want to hide some base template fields in some child templates. For that, I am referring

https://andrey-vinda.tech.blog/2017/10/30/sitecore-hide-fields-from-content-editor/.

In the above example, we have to inherit Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields

But I am not able to access it. Any idea how we can get this namespace in Sitecore 10.2 Version?

2 Answers 2

2

You have to use Sitecore.Client dll reference in your project, after that you will be able to access Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields Below is the pipeline processor for this

 <processor type="Sitecore.Shell.Applications.ContentEditor.Pipelines.
 GetContentEditorFields.GetFields, Sitecore.Client" >
 </processor>
 </getContentEditorFields>```

Hope this helps.

1

After extracting the DLL Sitecore.Client, I found that it exists in the same DLL. Please refer the screenshot.

enter image description here

And the namespace is also the same. So you have to use this DLL to access the Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields

namespace Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields
{
  /// <summary>Implements the Render Field pipeline.</summary>
  public class GetFields
  {
    /// <summary>
    /// Gets a value indicating whether the <see cref="T:Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields" /> shows the data fields only.
    /// </summary>
    /// <value>
    ///   <c>true</c> if the <see cref="T:Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields" /> shows the data fields only; otherwise, <c>false</c>.
    /// </value>
    public bool ShowDataFieldsOnly { get; private set; }

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.