Skip to content

Commit 76e3676

Browse files
committed
fix: id of content to be unique
`content` is already used as an id in the server template: https://github.com/nextcloud/server/blob/c10317f7f9f53a4de464915f754896eed7f1ee6c/core/templates/layout.user.php#L125 Make sure to have a unique id and to replace the correct dom element when mounting the vue app. The app uses NcAppContent which is rendered as a `<main>` tag. Mount the app on `main#content` from the server template so there is only one `<main>` on the page. Signed-off-by: Max <max@nextcloud.com>
1 parent f0f8dd5 commit 76e3676

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

templates/main.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
<div id="content"></div>
1+
<!--
2+
This is an empty template on purpose.
3+
Nextcloud server renders it inside the default layout
4+
in the <main id="content"> tag.
5+
6+
The vue app created in src/main.js replaces the main tag.
7+
Therefore any content provided here will be overwritten.
8+
-->

0 commit comments

Comments
 (0)