Here is the factory code for the Knowledge Base Article page for the Customer Hub. If you would like to use this code on your page, you can hit the red “Revert” button on your page. If you do not see the “Revert” button, that means your code is up to date.

If you have customized your code and would like to compare it with the factory code below, we recommend using a text compare tool such as DiffNow.

 <div ncy-breadcrumb></div>
<div class="container-fluid" style="background-color:white;">
	<div class="row">
		<div class="col-lg-10 col-md-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1" ng-show="!Unauthorized">
			<div class="row">
				<h1 class="text-center" ng-bind-html="KB.Article.Name"></h1>
			</div>
			<div class="row" style="margin-top:30px;">
				<div ng-repeat="ArticleBodyModel in KB.ArticleBodies" style="margin-bottom:20px;">
					<div ng-repeat="ArticleBody in ArticleBodyModel">
						<div ng-bind-html="ArticleBody.Description"></div>
					</div>
					<div ng-repeat="Attachment in ArticleBodyModel.Attachments" style="padding-top:4px;">
						<a ng-click="downloadKBAttachment(Attachment)"><i class="fa fa-paperclip"></i>{{Attachment.FileName}}</a>
					</div>
				</div>
				<div class="row">
					<div style="border-top: lightgrey solid 1px; padding-top:20px; margin-bottom:20px;">
						<div style="display:inline; padding-top:20px;">Was this article helpful to you?</div>
						<div style="display:inline; margin-left:10px;">
							<i ng-click="displayRatingModal(true)" ng-class="{'thumbsUp' : KB.KBRating.Rating == true }" class="fa fa-thumbs-up fa-2x"></i>
						</div>
						<div style="display:inline; margin-left:10px;">
							<i ng-click="displayRatingModal(false)" ng-class="{'thumbsDown' : KB.KBRating.Rating == false }" class="fa fa-thumbs-down fa-2x"></i>
						</div>
					</div>
					<div ng-if="KB.KBRating.Comment" style="margin-bottom:20px;">
						My Comments:
						<textarea class="form-control" ng-model="KB.KBRating.Comment" disabled="true" style="width:480px;"></textarea>
					</div>
					<div style="margin-top:30px; border-top: lightgrey solid 1px; padding-top:20px; margin-bottom:20px;" ng-show="KB.ArticleRating > 0">
						<div style="display:inline; padding-top:20px;">{{KB.ArticleRating}}% of voters found this helpful</div>
					</div>
				</div>
			</div>
		</div>
		<div ng-show="Unauthorized" class="text-center">
			<label>You are not authorized to view this Knowledge Base Article.</label>
		</div>
	</div>

	<modal title="Add/Edit a Rating" visible="showRatingModal">
		<form name="ratingForm" ng-submit="rateKBArticle(clientComment)" class="container-fluid" style="margin:10px;">
			<div class="row">
				<div style="display:inline;">Was this article helpful to you?</div>
				<div style="display:inline; margin-left:10px;">
					<i ng-click="KB.KBRating.Rating = true;" ng-class="{'thumbsUp' : KB.KBRating.Rating == true }" class="fa fa-thumbs-up fa-2x"></i>
				</div>
				<div style="display:inline; margin-left:10px;">
					<i ng-click="KB.KBRating.Rating= false;" ng-class="{'thumbsDown' : KB.KBRating.Rating == false }" class="fa fa-thumbs-down fa-2x"></i>
				</div>
			</div>
			<div class="row" style="margin-top:20px;">
				My Comments:
				<textarea class="form-control" ng-model="clientComment" style="min-height:100px;"></textarea>
			</div>
			<div class="row" style="text-align:right; margin-top:20px;">
				<input type="button" class="btn btn-danger" ng-click="resetRating()" value="Cancel">
				<button type="submit" class="btn btn-primary" ng-disabled="newContactForm.$invalid || commentSubmitting">Submit</button>
			</div>
		</form>
	</modal>
</div>

<style>
	.thumbsUp {
		color: green;
	}

	.thumbsDown {
		color: red;
	}
</style>

Need more help with this?
Don’t hesitate to contact us here.

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.