# Custom complex HTML code in the Discourse Header

**URL:** https://meta.discourse.org/t/custom-complex-html-code-in-the-discourse-header/113344
**Category:** Support
**Created:** [April 3, 2019, 1:25pm UTC](https://meta.discourse.org/t/custom-complex-html-code-in-the-discourse-header/113344 "2019-04-03T13:25:36Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![B-iggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/b-iggy/32/201234_2.png) [@B-iggy](https://meta.discourse.org/u/B-iggy)
#### Post date: [April 4, 2019, 1:22pm UTC](https://meta.discourse.org/t/custom-complex-html-code-in-the-discourse-header/113344/2 "2019-04-04T13:22:07Z")

</div>

After a lot of search crawling I found the solution. Thanks to @vinothkannans 🙂  
That post helped me!

> [@Widget Helper stripping attributes?](https://meta.discourse.org/t/widget-helper-stripping-attributes/68014/2):
>
> [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/header.js.es6#L93-L104](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/header.js.es6#L93-L104) As per above code, I guess it should be like below decorateWidget('header-icons:before', helper =\> { return h('li.header-dropdown-toggle', [ h('a.icon.btn-flat', { 'id': 'my id', 'href': 'http://example.com', 'title': 'my title', 'attributes': { 'aria-label': 'my label', …

Somehow the svg didn’t work overall, but I just used a less hipster variant of a checkbox switch 😉

Check out the totally revamped Alien Theme here:

> [@Alien Night Theme - A free Dark Theme for Discourse](https://meta.discourse.org/t/alien-night-theme-a-free-dark-theme-for-discourse/54175):
>
> discourse2Summary Discourse Alien Night is a dark focused clean theme with the Dark/Light toggle component in mind to enhance your forum!eyeglassesPreview [Preview on theme-creator.discourse.org](https://theme-creator.discourse.org/theme/B-iggy/alien-night-theme)hammer_and_wrenchRepository Link [GitHub - B-iggy/alien-night-discourse-dark-theme: A night friendly dark Discourse theme - dark/light switcher inclusive · GitHub](https://github.com/B-iggy/alien-night-discourse-dark-theme)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Note: with the release 4.0.0 …

---

_[View the full topic](https://meta.discourse.org/t/custom-complex-html-code-in-the-discourse-header/113344)._
