How to set/change attachment (file) order in kb article?

Yash40
Tera Contributor

I want to update the file attachment order based on the file name in kb article. i.e- Alphabetically but default setting is seems based on the timestamp of attachment.

I want to know from where we can change this setting? or from where we can set file attachment based on the file name (alphabetically).

Yash40_0-1673264040022.png

 

Please help to understand this configuration.

 

3 REPLIES 3

mattystern
Kilo Sage

Hi Yash,

 

You can configure this widget by holding CTR, right clicking and clicking "Widget in Editor"

mattystern_0-1673298119015.png

I would suggest making a copy of this widget if you are going to edit it. Good luck!

@mattystern , Thank you for your reply.

 

I have cloned the widget but still not able to find out the exact code where I need to make changes for attachment order.

Hello,
Did you find any solution for this question?

I have the same problem.

What i have found, that need to modify the Knowledge Attachments widget.

In the client controller part:

function($rootScope, $scope, spUtil, cabrillo) {
/* widget controller */
var c = this;

c.isMobile = spUtil.isMobile() || cabrillo.isNative();
$scope.attachments = $rootScope.attachments;

...this is where need to sort...

}

 

The new order appeared in the console log, but not in the page...

Thanks,