Loading
Service
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Article Type Templates

          Article Type Templates

          Article types in Salesforce Knowledge require a template for each channel. The standard article-type templates—Tab and Table of Contents—specify how the sections in the article-type layout appear in the published article. For example, if you choose the Tab template, the sections defined in the layout appear as tabs when users view an article. With the Table of Contents template, sections appear on a single page with hyperlinks to each section. You can also create a custom template using Visualforce. Custom templates aren’t associated with the article-type layout.

          Required Editions

          Available in Salesforce Classic. View supported editions.
          User Permissions Needed
          To create, edit, or delete article-type templates:

          Customize Application

          AND

          Manage Salesforce Knowledge

          Note
          Note To ensure access to Visualforce pages, always set the Visualforce permissions and visibility for article templates.
          1. From Setup, enter Knowledge Article Types in the Quick Find box, then select Knowledge Article Types
          2. Click an article type name.
            • For a default template, continue with Step 12.
            • To create a custom template, make note of the article type's API Name. You need this value when you create the Visualforce page.
          3. From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
          4. Click New.
          5. In the Name text box, enter the text that appears in the URL as the page name.

            This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

          6. In the Label text box, enter the text that users see when choosing this template from the Channel Displays related list on the article type detail page.
          7. Add your Visualforce markup.

            The only requirement for custom article-type templates is that the standard controller is equal to the API Name of the article type. For example, if the API Name of the article type is Offer__kav, your markup is:

            <apex:page standardController="Offer__kav">
                              
                              ... page content here ...
                              
                              </apex:page>
            Note
            Note Click Component Reference for a list of the Visualforce components, such as knowledge:articleRendererToolbar and knowledge:articleCaseToolbar, available for use in custom article-type templates.
          8. If your article type has a File field, you can allow users to download the field's content.

            In this example, the article type is Offer, the name of the File field is my_file, and the text that appears as a link is Click me:

            <apex:outputLink value="{!URLFOR($Action.Offer__kav.FileFieldDownload, 
                                          Offer__kav.id, ['field'=$ObjectType.Offer__kav.fields.my_file__Body__s.name])}">Click
                                          me</apex:outputLink> 
            Note
            Note If the File field is empty (meaning the author didn't upload a file), the link still appears on the published article but has no function. If you do not want the link to appear when the File field is empty, replace Click me in the example with the name of the file. For example, {!Offer__kav.my_file__Name__s}.
          9. Click Save.

            Your custom template can now be assigned to any channel on the article type.

          10. From Setup, enter Knowledge Article Types in the Quick Find box, then select Knowledge Article Types
          11. Click an article type name.
          12. For each channel, specify the template.
            • For Internal App, Customer and Partner, Tab is the default template.
            • For Public Knowledge Base, Table of Contents is the default template.
            • If you created a custom template for this article type, it also appears in the dropdown menu.
          13. Save your work.
          Example
          Example

          If you choose the Tab template, the sections you defined in the layout appear as tabs when users view an article.

          Published Article Using the Tab Article-Type Template

          Tab Article-Type Template

          If you choose the Table of Contents template, the sections you defined in the layout appear on one page with hyperlinks to each section title.

          Published Article Using the Table of Contents Article-Type Template

          Table of Contents Article-Type Template
           
          Loading
          Salesforce Help | Article