# Postmessage to change the sidbar status

**URL:** <https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394>\
**Category:** Installation & Configuration\
**Created:** [May 27, 2021, 10:12am UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394 "2021-05-27T10:12:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsoika](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/rsoika/32/138_2.png) [@rsoika](https://forum.collaboraonline.com/u/rsoika)\
**Post date:** [May 27, 2021, 10:12am UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/1 "2021-05-27T10:12:27Z")

</div>

Is there an easy way to send a Postmessage form the Host to the editor to click a button?  
I want to toggle the Sidebar after the editor was initialized (Host\_PostmessageReady). But I did not find a corresponding message.

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [May 27, 2021, 11:49am UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/2 "2021-05-27T11:49:44Z")

</div>

I’m not sure if this is what you want but I think you can simply adjust the `loolwsd.xml` inside of `<user_interface>` and add:

```xml
      <writer>
          <ruler type="bool" desc="Controls whether the ruler would be shown at the first load of the document." default="true">true</ruler>
          <statusbar type="bool" desc="Controls whether the statusbar would be shown at the first load of the document." default="true">true</statusbar>
          <sidebar type="bool" desc="Controls whether the sidebar would be shown at the first load of the document." default="true">false</sidebar>
      </writer>
      <spreadsheet>
          <sidebar type="bool" desc="Controls whether the sidebar would be shown at the first load of the document." default="true">false</sidebar>
      </spreadsheet>
      <presentation>
          <statusbar type="bool" desc="Controls whether the statusbar would be shown at the first load of the document." default="true">true</statusbar>
          <sidebar type="bool" desc="Controls whether the sidebar would be shown at the first load of the document." default="true">false</sidebar>
      </presentation>

```

also during sending the form when the iframe is being set up (similarly as the `access_token` ). The VALUES can have a form like:

```auto
UIMode=notebookbar;TextRuler=false;PresentationStatusbar=false;SpreadsheetSidebar=false

```

[https://sdk.collaboraonline.com/docs/theming.html](https://sdk.collaboraonline.com/docs/theming.html)

---

<div class="post-metadata">

**Author:** ![rsoika](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/rsoika/32/138_2.png) [@rsoika](https://forum.collaboraonline.com/u/rsoika)\
**Post date:** [May 27, 2021, 12:56pm UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/3 "2021-05-27T12:56:53Z")

</div>

Ah! OK that’s the information I was missing. Thanks a lot I will try this out.

---

<div class="post-metadata">

**Author:** ![rsoika](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/rsoika/32/138_2.png) [@rsoika](https://forum.collaboraonline.com/u/rsoika)\
**Post date:** [May 30, 2021, 9:27pm UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/4 "2021-05-30T21:27:23Z")

</div>

It seems not to be possible to disable the sidebar via the loolwsd.xml file.  
I tried a lot but without any success, the sidebar is always visible after launching.

I also did not find an official documentation about the tags in the \<user\_interface\> section.

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [May 31, 2021, 7:07am UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/5 "2021-05-31T07:07:03Z")

</div>

Oh sorry to hear that. I have just tried myself now with a fresh installation and interestingly enough it seems to be a bug with the sidebar itself because the ruler successfully get hidden but not the sidebar with:

```xml
    <user_interface>
      <mode type="string" desc="Controls the user interface style (classic|notebookbar)" default="classic">notebookbar</mode>
      <writer>
          <ruler type="bool" desc="Controls whether the ruler would be shown at the first load of the document." default="true">false</ruler>
          <statusbar type="bool" desc="Controls whether the statusbar would be shown at the first load of the document." default="true">true</statusbar>
          <sidebar type="bool" desc="Controls whether the sidebar would be shown at the first load of the document." default="true">false</sidebar>
      </writer>
    </user_interface>

```

And also some more information on `user-interface` settings: [Configuration — SDK https://sdk.collaboraonline.com/ documentation](https://sdk.collaboraonline.com/docs/installation/Configuration.html#user-interface-settings) but it’s quite scarse. I will try to hunt this down and find out what’s the blocker here. thanks!

---

<div class="post-metadata">

**Author:** ![rsoika](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/rsoika/32/138_2.png) [@rsoika](https://forum.collaboraonline.com/u/rsoika)\
**Post date:** [May 31, 2021, 4:59pm UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/6 "2021-05-31T16:59:28Z")

</div>

I have opened this bug report on github: [Sidebar can not be hidden on startup · Issue #2510 · CollaboraOnline/online · GitHub](https://github.com/CollaboraOnline/online/issues/2510)

---

<div class="post-metadata">

**Author:** ![rsoika](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/rsoika/32/138_2.png) [@rsoika](https://forum.collaboraonline.com/u/rsoika)\
**Post date:** [June 15, 2021, 4:46pm UTC](https://forum.collaboraonline.com/t/postmessage-to-change-the-sidbar-status/394/7 "2021-06-15T16:46:07Z")

</div>

I managed to hide the sidebar by adding the following hidden input field into my iframe form:

`<input name="ui_defaults" value="UIMode=notebookbar;TextSidebar=false" type="hidden"/>`
