Skip to main content

Customizing Article Templates: A Guide to Hiding Author and Update Information - Knowledgebase / Using Deskpro - Deskpro Support

Customizing Article Templates: A Guide to Hiding Author and Update Information

Authors list

When creating or managing an article, there may be instances where you want to hide certain information, such as the agent profile icon or details about who last updated the article and when:

AD_4nXcv68cc0HpGvUHkbPqh9v9dTiKnstEf_mKvUXVBFVTgg1k1qaakGJdEwglxcBV1Q99olXv8sKl98BC65DGDxtrOp6gtU8pUKyjZ07OhcMBd2zzHnkIYB7Z0IBOm3zyl16TVlSAIanEP65NnuJzDM-rcfaw?key=QKTDnhiRm91DgbvW_TDwEg

To achieve this, you'll need to update the HTML template for articles. Follow these steps:

  1. Navigate to Admin > Help Center > Help Center Design > Open Template Editor.

  2. In the Template Editor, locate and open the template named ‘view.html’ (Articles).

  3. Once the template is open, search for the code section between lines 150 and 160 and remove the code.

                    <div class="col-sm-10">
                        {% include 'Theme:PublishCommon:post-avatars.html.twig' with { item: article } %}
    
                        <div class="dp-po-post-info">
                            <ul class="dp-po-post-info-list">
                                <li class="dp-po-post-info-item">
                                    {{ phrase('helpcenter.general.last_update_by', {date_updated: article.last_revision.created_at | default(article.date_created), person_name: article.last_author.display_name_user}) | raw }}
                                </li>
                            </ul>
                        </div>
                    </div>



AD_4nXf9gHdzjLuucUJvK-6kqtVBzb4XANFwgFkO19tveoC-Kw0sxGN9l6uStinXvqkC0LXqz1YpUHoQQufJg04N4NrHzIRtoOeSj5wxqPQ4Lei9geZsHwvs9Zf08wS5_eRTyPsFDCovE465MvsNKGAl2z38vbP-?key=QKTDnhiRm91DgbvW_TDwEg

  1. Save the template. After saving, the specified information will no longer be displayed in your article.


AD_4nXf2VTPwRPRGu2PPvCdzeQAZzVXRxcEHOS3ReLSm7oMnQgZxkCMRhtL63syosx8Dt8Gcfglem0W7oozrjvesm8TMjkKD8ZqfM7PUkOFoWNtyLIhzG63zhVJuHOL2h2Lo20Uo4kj_s9R613jwyqnsr79-eMw_?key=QKTDnhiRm91DgbvW_TDwEg

Additionally, if you'd like to remove the panel displaying the Author, Creation Date, Last Update, and Publish Date, locate the relevant code in the template:

  • If no previous changes have been made to the template, you can find the code on line 262, highlighted in a green box: ['Theme:PublishCommon:meta.html.twig'].


AD_4nXd0JFGkU09Z8mQWBfSG87mz7jzapGGo_eZ-gdAd7cWCk7zK4yE_VZFkLqWO9Kzf6cHfz49FfmeH3RI-15gctiXxEESfyGApKYttetd1lFnBwPwteLfewbR9OjB7x9_7mvQHW4f9k84o4UWkFd7ZmVvhwd8?key=QKTDnhiRm91DgbvW_TDwEg

After making these changes, the page will appear as shown below:

AD_4nXcrYMzqVTFyt4_rRFb0drvGO0E_BNXQXa7uzHXYMqPEeXvqaOcIRwlRCf4cwYEPqwujB3-a0xzkyeqA2CcOmZOxyqVnG4iALlKX19lXvzANR2BykW7flTICXPyQqjNpbck8wBcsKJfvodtmtio1Ysc6x3lK?key=QKTDnhiRm91DgbvW_TDwEg

Helpful Unhelpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?