Skip to content

Allow page include system to include everything under a header level #3854

@WoosterInitiative

Description

@WoosterInitiative

Describe the feature you'd like

It seems that a common use case for an include would be a header and everything underneath it. Say there's a page defined like so (using Markdown for easy text visibility):

# Example Page Title

## Heading 1

Some text

## Heading 2

### Subheading 2.1

Some text

### Subheading 2.2

1. item 1
2. item 2

## Heading 3

Some more **text** with `inline code`

Now lets say I want Heading 2 and everything underneath it on another page; currently, I don't see a "clean" way to do this. The only way I can think of is to grab the bookmark for each element (heading 2, subheadings 2.1 and 2.2, as well as the paragraph in 2.1 and the ol in 2.2).

Describe the benefits this would bring to existing BookStack users

I believe this would be an intuitive and clean way for users to include content from one page on another page. I could be wrong, but it seems that this would be a common need for an include that wasn't a full page include.

Can the goal of this request already be achieved via other means?

Not that I can tell. Perhaps with Page Include Parse, but I don't see how.

I tried using the source code view and adding my own <div> tag around the header and content I wanted with a custom id starting with bkmrk-, but the tag would move every time I saved the code.

Otherwise, it's one block at a time. The other way would be to create a "dummy" page of the content and include it in both places, which I suppose works, but isn't as intuitive to me.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions