web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Custom Portal - How to display Knowledge article from Category Details Web Page ?

(0) ShareShare
ReportReport
Posted on by 44

Hi,

I am using a custom portal and would like to add knowledge base on it in the navbar.

I tried to follow how it was done in Self-service portal by creating same records. However I come to a point where I can display category details page but can't access to an article : 

custom-portal-article-href-empty.png

HTML href tag is empty.

If we look into self-service portal, HTML href tag is filled with <a href="/knowledgebase/article/KA-01... class="title">TEST ARTICLE</a>. 

How could I achieve that in custom portal ? I don't know very much about Liquid but from what I read the liquid code in the category details web template doesn't include article detail page. 

I have the same question (0)
  • CRMJetty Profile Picture
    3,512 on at

    Hello,

    pls refer this link

    https://docs.microsoft.com/en-us/dynamics365/portals/configure-knowledge-categories-articles

    also pls refer this video,

    https://www.youtube.com/watch?v=zz7mNOpkWdQ

    I hope it helps,

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Alex519,

    In fact, just category can list on the page, you need first associate article to one category, then click this category on the portal you will see articles, just like this:

    (1) open one article in customer service hub, select Associate Category.

    pastedimage1606208199732v1.png

    (2) click this category on the portal.

    pastedimage1606208212040v2.png

    (3) you will see:

    pastedimage1606208224808v3.png

    You can refer following to Configure and manage category:

    https://docs.microsoft.com/en-us/dynamics365/portals/configure-knowledge-categories-articles

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Alex519 Profile Picture
    44 on at

    Hi Leah,

    Actually my question was more about configuring the knowledge base in a custom portal using Liquid, web template, web pages, snippet, site markers etc .. since the configuration is only partial. Web template for example doesn't exist, so I did create a custom web template from what I saw on the self-service portal for which knowledge is already configured.

    However regarding the custom portal, I am facing an issue to display articles because of my lack of Liquid Knowledge.

    So I have some difficulties to understand how knowledge base is handle in Portal.

    I see this code (below) which shows how articles are displayed but I have a behavior in portal that shows nothing when clicking on a category hyperlink. The page just refreshed itself.

    Custom-portal-_2D00_-knowledge-base-for-articles.PNG

    Do you have any idea on what I am missing ?

    Regards

  • Verified answer
    Fubar Profile Picture
    2,761 on at

    Look at what is actually being done for the Customer Self Service.  There are 2 main Web templates being utilised:

    • Knowledge Base - Home: this lists the categories and creates URLs that pass the category number to the child page
    • Category Details: this receives the category number in the id parameter, which is then used to end up getting the GUID of the actually category (this is then substituted into the FetchXML query to retrieve the collection of articles)

    Note: there are several other preconditions for the existing templates, Articles must be set to not be Internal only, Articles must be published, Articles must have at least 1 Category assigned to them, the Article language must match the Portal language, Portal user must have privileges to read category and knowledge articles.

    Also, articles can be slow to sync to the Portal, and sometimes you may need to manually reset the search index (<your portal>/_services/about )

    {% extends 'layout_1_column' %}
    
    {% block main %}
      {% include 'Page Copy' %}
      {% assign category_url = sitemarkers['Category'].url %}
      {% assign count = count | default: 0 %}
      {% assign categories = knowledge.categories | top_level: count %}
      {% if categories %}
        
    {% for category in categories %} {{ category.title }} {% endfor %}
    {% endif %} {% endblock %}

    {% extends 'Layout 1 Column' %}
    
    {% block breadcrumbs %}
      {% assign categoryid = request.params['id'] %}
      
      {% if categoryid %}
        {% assign category = knowledge.categories | category_number: categoryid %}
        {% if category %}
          {% assign pagetitle = category.title %}
          {% assign categoryguid = category.categoryid %}
        {% else %}
          {% assign pagetitle = resx["Knowledge_Article_Unavailable"] %}
        {% endif %}
      {% endif%}
      {% include 'Breadcrumbs' title: pagetitle %}
    {% endblock %}
    
    {% block title %}
      {% include 'Page Header' title: pagetitle %}
    {% endblock %}
    
    {% block main %}
      {% include 'Page Copy' %}
    
      {% assign category_url = sitemarkers['Category'].url %}
      
      {% assign portallanguagecode = website.selected_language.code %}
      
      {% if categoryguid %}
        {% fetchxml knowledgearticlecategory_query %}
          
            
              
              
              
              
              
              
                
                
                
              
                       
                  
                    
                           
              
              {% if portallanguagecode %}
              
                  
                    
                  
                
              {% endif %}
            
          
        {% endfetchxml %}
        
        {% assign articles = knowledgearticlecategory_query.results.entities %}
        {% if articles.size > 0 %}
          
        {% endif %}
        
        {% include 'Category - Related Categories' categoryguid: categoryguid %}
      {% else %}
        
    {% editable snippets "KnowledgeManagement/ArticleUnavailableMessage" %}
    {% endif %} {% endblock %}

  • Alex519 Profile Picture
    44 on at

    Hi LA,

    Thank you for your reply and details for the two web templates.

    It worked well after adding sitemarkers for children web pages but I am still trying to figure out how.

    There is no sitemarker mentioned in  web templates code for article. "category_url" seems not to be used as well.

    Also, where can I find the resx content ?

    Regards,

  • Mico365 Profile Picture
    5 on at

    Hello Alex, can you share your solution with this? I'm currently experiencing the same issue you encountered. Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans