Skip to main content

We are building an internal site (Aura based) with the knowledge articles udes in our customer service.

 

I am using the "Article Content" Component to show a specific article - but the summary field of the article is shown two times - this is in Danish, but I hope you get the point:

Article Summary repeated in the

Is this an error related to the component, is it related to a page layout or??

 

/ Dan Sletten

10 件の回答
  1. 2023年12月28日 15:23

    @Dan Sletten, It appears that the duplication of the summary section in Salesforce is a default behavior. To address this issue, you can consider the following solutions:

     

    Sample Knowledge article with duplicate summary sections that I will use to explain the solution., It appears that the duplication of the summary section in Salesforce is a default behavior.

    Option#1: Hide the summary under the title (highlighted in yellow in your screenshot)

    1. Navigate to Builder Mode > Theme > Edit CSS.
    2. Add the provided CSS below and save the changes.

    .article-summary{

    display: none!important;

    }

    //add !important only if the change does not reflect

    Option#1.png

    Option#2: Hide the summary section (highlighted in green in your screenshot)

    1. Navigate to Builder Mode > Theme > Edit CSS.
    2. Insert the provided CSS below and save your modifications.

    [data-target-selection-name="sfdc:RecordField.Knowledge__kav.Summary"]{

    display: none!important;

    }

    //add !important only if the change does not reflect

    Option#2.png

    Please note: If the provided code blocks do not yield the desired results, ensure that you verify the element class name for your Experience Site. While in preview mode (NOT in Builder mode), right-click and inspect the element to identify the corresponding class/data-target name. Adjust the CSS accordingly based on your findings. Sample screenshots below when I inspect the Experience Site I am working on.

     

    If you have any further questions or need additional clarification, please feel free to reach out. Otherwise, if the solution I've provided has successfully addressed your issue, I would appreciate it if you could mark it as the best answer. Thank you!Option#1Inspect.pngOption#2Inspect.png