elstoc / ecms-ui

ecms (ui)
1 stars 0 forks source link

Markdown: Only allow new pages to be added as children or siblings #185

Open elstoc opened 1 day ago

elstoc commented 1 day ago

The only way to add a new page should be to click an icon in the markdown toolbox. This allows you to choose to create either a "sibling" page or a "child" page, which brings up a dialog asking for the page's title and path (prepended with the current ui path -- display this in the dialog but not amendable). Restrict the characters that can form the path.

This should only be permitted if the page has a navigation section (is not a single-page markdown component) and the current user has permission to do so.

elstoc commented 8 hours ago

Do this via the api returning singlePage = true instead of includeNav = false and then passing that through the routes.

elstoc commented 8 hours ago

Depends on https://github.com/elstoc/ecms-api/issues/150