# Where are the instructions how to use the latest version of the widget plugin api

**URL:** <https://meta.discourse.org/t/where-are-the-instructions-how-to-use-the-latest-version-of-the-widget-plugin-api/71768>\
**Category:** Development\
**Created:** [2017年十月10日 14:56 UTC](https://meta.discourse.org/t/where-are-the-instructions-how-to-use-the-latest-version-of-the-widget-plugin-api/71768 "2017-10-10T14:56:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![piratdavid](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@piratdavid](https://meta.discourse.org/u/piratdavid)\
**Post date:** [2017年十月10日 14:56 UTC](https://meta.discourse.org/t/where-are-the-instructions-how-to-use-the-latest-version-of-the-widget-plugin-api/71768/1 "2017-10-10T14:56:55Z")

</div>

Hi,

There’s a few things I can’t make out how to do in the later versions of the widget api. Before it was very convenient where one could just add ‘icon’, ‘label’, ‘href’ etc to for example a menu link. In particular I’d like to know how to add a font-awsome icon with the virtual-dom api. Any instructions would be nice.

/david

---

<div class="post-metadata">

**Author:** ![piratdavid](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@piratdavid](https://meta.discourse.org/u/piratdavid)\
**Post date:** [2017年十月10日 16:55 UTC](https://meta.discourse.org/t/where-are-the-instructions-how-to-use-the-latest-version-of-the-widget-plugin-api/71768/2 "2017-10-10T16:55:53Z")

</div>

Manged to use the virtual dom to create a copy of what something like this:

`return { href: '/link', label: 'main_menu.link.title', icon: 'link-o' }`

would return in the dom. But my links reload the whole page now. Is there a better way of creating menu links? Here is what i add to menu-links:after:

```
h('li', h('a.widget-link', {'href': '/link'}, [
  h('i.fa.fa-link', {"style": "margin-right: 4px;"}),
  h('span', I18n.lookup('main_menu.link.title'))
])) 

```

This link reloads the whole page with the pathname.
