Embedded Layout
When embedding Rocket.Chat in your site, you can change the layout by adding
?layout=embedded
after your server URL. For example, https://open.rocket.chat/channel/general?layout=embedded. It changes the layout of Rocket.Chat to a more "simplistic" view, hiding the left sidebar with the channel lists and account management buttons. Additionally, to enable the top navbar of the room in the embedded layout,
- Navigate to Administration > Workspace > Settings > Layout > User Interface
- Enable Show top navbar in embedded layout.
When a URL is set to embedded mode, the view will be restricted to a single room, as the user won't have access to the channel lists. When combined with Iframe integration, the embedded layout works as expected because you can already login the user and only show a specified channel embedded in the application.
To prevent users from accessing other channels, relying on the embedded layout alone won't suffice. Users could alter the URL using browser tools. Therefore, it's recommended to edit the user permissions to restrict access to other channels.