<  Widgets

RocketFuel KB Category Articles

### Description

This widget allows a user to select articles from within a specific knowledge category.
- Uses `KBPortalServiceImpl` service for querying knowledge categories.

### Configuration

This widget takes a parameter, kb_category, from the url. The value of this parameter determines the category from which to display articles. If no knowledge base is specified in the portal record, one must be specified via the 'sys_id' parameter in the URL.

### Instance Options

| Option | Property | Comments | Source |
| ----- |:-----:| ---- | ---- |
| Template | `u_template` | Takes an `id` from a ngTemplate associated with the widget. These templates can be used to customize the layout of the widget. | *Instance* |
| Bootstrap Class Name | `class_name` | Allows you to add CSS classes to the class attribute of the widget's parent div. | *Instance* |
| Results per page | `results_per_page` | Specifies page results when a user clicks on of the the records generated in the list.| *Instance* |
| Page| `u_page` | Specifies which page to take the user to when they click on of the the records generated in the list.| *Instance* |
| Show Author | `show_author` | Allows you to display author of article. Default: `true` | *Options Schema* |
| Show View Count | `show_view_count` | Allows you to display view count of article. Default: `true` | *Options Schema* |
| Show Asked By | `show_asked_by` | Displays author of question. Default: `true` | *Options Schema* |
| Show Last Updated On | `show_last_updated_on` | Displays the how long since article was updated. Default: `true` | *Options Schema* |
| Show Rating | `show_rating` | Displays the star rating of article. Default: `true` | *Options Schema* |
| Show Vote Count | `show_vote_count` | Displays the vote count of article. Default: `true` | *Options Schema* |
| Show Answer Count | `show_answer_count` Displays the answer count of article. Default: `true` | *Options Schema* |

### CSS/SASS Variables

_CSS/SASS variables are given default values that can be overridden with theming or portal-level CSS._

| Variable | Comments |
| -------- |:---|
| `$nr-kb-cagegory-article-star-color` | This variable is used to set article color. |

### Templates

| Name | Comments |
| -------- |:---|
| `kb-article.html` | Standard card template using kb-card-template directive. |

### Sample Data
```json
{
   "options": {
       "results_per_page": "3",
       "show_author": "true",
       "show_view_count": "true",
       "show_asked_by": "true",
       "show_last_updated_on": "true",
       "show_rating": "true",
       "show_vote_count": "true",
       "show_answer_count": "true",
       "display_as_panel": "true"
   },
   "data": {
       "keywords": false,
       "categoryExists": true,
       "query_count": null,
       "templateID": "kb-article.html",
       "kb_knowledge_page": "nr_kb_home",
       "results_per_page": null,
       "items": [
           {
               "snippet": "Permanence of the stars inconspicuous motes of rock and gas as a patch of light courage of our questions white dwarf colonies. Stirred by starlight a still more glorious dawn awaits extraplanetary culture brain is the seed of intelligence from which we spring. Rich in heavy atoms network of wormholes are creatures of the cosmos with pretty stories for which there's little good evidence rich in heavy atoms Orion's sword?",
               "meta": {
                   "view_count": "1",
                   "author": "Wayne Webb",
                   "rating": "0",
                   "updated_on": "2014-12-19 15:55:18"
               },
               "title": "Are Copyrighted Files Illegal to Have On My Computer?",
               "link": "#"
           },
           {
               "snippet": "Rig Veda with pretty stories for which there's little good evidence hearts of the stars of brilliant syntheses another world realm of the galaxies. Paroxysm of global death vastness is bearable only through love the sky calls to us vanquish the impossible Sea of Tranquility descended from astronomers? The ash of stellar alchemy Sea of Tranquility astonishment citizens of distant epochs a very small stage in a vast cosmic arena invent the universe.",
               "meta": {
                   "view_count": "4",
                   "author": "System Administrator",
                   "rating": "1",
                   "updated_on": "2015-06-11 17:10:53"
               },
               "title": "Getting Around in Windows",
               "link": "#"
           },
           {
               "snippet": "Rings of Uranus emerged into consciousness laws of physics with pretty stories for which there's little good evidence network of wormholes prime number. Muse about billions upon billions inconspicuous motes of rock and gas two ghostly white figures in coveralls and helmets are soflty dancing a very small stage in a vast cosmic arena two ghostly white figures in coveralls and helmets are soflty dancing. A mote of dust suspended in a sunbeam are creatures of the cosmos rich in heavy atoms at the edge of forever courage of our questions extraordinary claims require extraordinary evidence?",
               "meta": {
                   "view_count": "4",
                   "author": "Wayne Webb",
                   "rating": "2.67",
                   "updated_on": "2014-12-19 15:55:39"
               },
               "title": "What is a cookie?",
               "link": "#"
           }
       ]
   }
}
```
### Dependencies
_Dependencies are included and configured as part of the provided Update Set._

> None

Get Awesome Updates

Enter your email address for news and updates from NewRocket.

Thanks for your email!
There was an error, please try submitting again.