Can you change the Knowledge Article View (kb_view.do) to display recently updated by?

TylerTeter
Kilo Guru

I got a request to see about changing the knowledge article view at the bottom from this:

find_real_file.png

to something closer to this:

find_real_file.png

You can see this information from the All Articles View, but it would also greatly help if we could see it from the article itself.

I've dug into the properties (Configuring Knowledge Properties - ServiceNow Wiki ) and haven't found anything related to this functionality.

I've done some research on updating the kb_view.do page, since I believe that's what I need to do to accomplish this.

https://community.servicenow.com/thread/161516?q=Can%20you%20update%20the%20kb_view.do

https://community.servicenow.com/thread/169418?q=Can%20you%20change%20the%20Knowledge%20Article%20Vi...

Re: I am trying to add additional fields when you view a knowledge article from within an Incident.

I'm under the assumption modifying these pages is discouraged because of updates and things of that sort.

Any advice or ideas on how I could solve this problem? Thanks in advance!

1 ACCEPTED SOLUTION

Here is an un-styled implementation of the footer you've been asked to create:

"kb_view_common_footer" UI Macro.



<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


  <g:inline template="kb_view_common_footer_metadata_attachments" />


  <g:inline template="kb_attached_tasks_v3"/>


  <g:inline template="kb_affected_products_v3"/>


    <!--OOB Code - Start-->


  <!--


  <div class="snc-article-header-author">


  <j:choose>


  <j:when test="${authorImage.length != 0}">


  <img id="authorImage" class="snc-article-header-author-image" src="${authorImage}" />


  </j:when>


  <j:otherwise>


  <div id="authorGhost" class="icon-user-profile snc-article-header-author-ghost" />


  </j:otherwise>


  </j:choose>


  <div id="articleAuthor" class="snc-article-footer-metadata-published" style="display: block;padding-top: 5px">


  ${gs.getMessage('Authored by {0}', authorName)}


  </div>


  <g:evaluate var="jvar_time_ago_msg">


  var timeAgo = new GlideTimeAgo().getField(knowledgeRecord, "sys_updated_on");


  gs.getMessage("Last modified {0}", timeAgo);


  </g:evaluate>


  <div id="articleModified" class="snc-article-footer-metadata-published">


  ${jvar_time_ago_msg}


  </div>


  </div>


  -->


    <!--OOB Code - End-->



    <!--Custom Code - Start-->


  <div class="snc-article-header-author">


        <div class="kb_version">${gs.getMessage('Version')}: ${knowledgeRecord.sys_mod_count.toString()}.0</div>


        <div class="kb_author">${gs.getMessage('Created at')}: ${knowledgeRecord.sys_created_on} ${gs.getMessage('by')} ${knowledgeRecord.author.getDisplayValue()}</div>


        <g:evaluate var="jvar_time_ago_msg">


              var timeAgo = new GlideTimeAgo().getField(knowledgeRecord, "sys_updated_on");


              gs.getMessage("Last modified at", timeAgo);


      </g:evaluate>


      <div class="kb_updated">${jvar_time_ago_msg} ${gs.getMessage('by')} ${knowledgeRecord.sys_updated_by}</div>


  </div>


  <!--Custom Code - End-->



  <div id="articleFooterSection" class="snc-article-footer-section" style="display: none;">


  <j:if test="${sysparm_no_rating != true}">


  <div class="snc-article-footer-section-ratings">


  <g:inline template="kb_view_ratings" />


  </div>


  </j:if>



  <g:inline template="kb_article_comments" />


  </div>


  <j:if test="${isMobileView != true}" !>


  <div id="articleFooter" class="snc-article-footer">


  <g:inline template="kb_view_common_footer_metadata_fields" />


  </div>


  </j:if>


</j:jelly>



Please mark this as helpful... but only if it's helpful


View solution in original post

7 REPLIES 7

Hi Mandle,

 

I've gone through ur post, but am unable to see the ${gs.getMessage('Authored by {0}', authorName)} in my UI Macro "kb_view_common_footer". 

 

My concern is to display the Created by and Created date; Modified by and Modified Date. Where and How to achieve it?

 

Thanks in advance!

 

Regards,

Krishna

Hi Mandle,

 

I've gone through ur post, but am unable to see the ${gs.getMessage('Authored by {0}', authorName)} in my UI Macro "kb_view_common_footer". 

 

My concern is to display the Created by and Created date; Modified by and Modified Date. Where and How to achieve it?

 

Thanks in advance!

 

Regards,

Krishna

@mandle 

I have similar question. Can you please have a look to below link & suggest?

OOB revised by is shown on kb_view_do page. I wish to change it to show Author name.

Is it possible?

Can you please guide me?

https://www.servicenow.com/community/incident-management-forum/kb-article-to-show-author-instead-of-...