[Feature Request] Static Button To Add Page(s) #2357

Open
opened 2026-02-05 03:47:08 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @athornfam2 on GitHub (Aug 15, 2021).

Describe the feature you'd like
I was wondering if it would be possible or difficult to add a button that says Add, Create, or a + button at the top. Giving you the ability to quickly create content...

Describe the benefits this feature would bring to BookStack users
It would help to quickly create content rather than having to drill down through different books or shelves. It would be nice just to click Add pops up with a page and then you select which book and shelf you want to add the page to. Would greatly speed things up if you already have established shelves and books.
To add or continue it would be nice to create books and shelves if they don't exist within this create a page option.

Originally created by @athornfam2 on GitHub (Aug 15, 2021). **Describe the feature you'd like** I was wondering if it would be possible or difficult to add a button that says Add, Create, or a + button at the top. Giving you the ability to quickly create content... **Describe the benefits this feature would bring to BookStack users** It would help to quickly create content rather than having to drill down through different books or shelves. It would be nice just to click Add pops up with a page and then you select which book and shelf you want to add the page to. Would greatly speed things up if you already have established shelves and books. To add or continue it would be nice to create books and shelves if they don't exist within this create a page option.
Author
Owner

@thejezzi commented on GitHub (Aug 23, 2022):

I also would love to have this feature. Would make my life a lot easier and faster! :)

@thejezzi commented on GitHub (Aug 23, 2022): I also would love to have this feature. Would make my life a lot easier and faster! :)
Author
Owner

@bhsmither commented on GitHub (Sep 21, 2022):

I needed to do this. In a cram session, I needed to add two dozen chapters and two dozen pages to each chapter. Initially, the pages were to be blank (titles only), to be filled in later.

After creating a page, I had to go back to the Chapter to access the New Page button.

The solution I implemented is as follows:

  1. Copy /resources/views/pages/show.blade.php to /themes/your_theme/pages/.
  2. Near line 146, find:
            {{--User Actions--}}

Add after:
            @if(userCan('page-create', $page->chapter))
                <a href="{{ $page->chapter->getUrl('/create-page') }}" class="icon-list-item">
                    <span>@icon('add')</span>
                    <span>Sibling Page</span>
                </a>
            @endif

This was taken from the /chapters/show.blade.php file, and slightly modified, because when viewing a page, the $chapter variable is not set, but $page->chapter is usable.

When viewing a page, there is now a link for adding a 'sibling page' in the same chapter.

Soon, I will do the same for Chapters - adding a sibling chapter link for the same book (without first having to view the Book page).

@bhsmither commented on GitHub (Sep 21, 2022): I needed to do this. In a cram session, I needed to add two dozen chapters and two dozen pages to each chapter. Initially, the pages were to be blank (titles only), to be filled in later. After creating a page, I had to go back to the Chapter to access the New Page button. The solution I implemented is as follows: 1. Copy /resources/views/pages/show.blade.php to /themes/`your_theme`/pages/. 2. Near line 146, find: ``` {{--User Actions--}} Add after: @if(userCan('page-create', $page->chapter)) <a href="{{ $page->chapter->getUrl('/create-page') }}" class="icon-list-item"> <span>@icon('add')</span> <span>Sibling Page</span> </a> @endif ``` This was taken from the /chapters/show.blade.php file, and slightly modified, because when viewing a page, the `$chapter` variable is not set, but `$page->chapter` is usable. When viewing a page, there is now a link for adding a 'sibling page' in the same chapter. Soon, I will do the same for Chapters - adding a sibling chapter link for the same book (without first having to view the Book page).
Author
Owner

@athornfam2 commented on GitHub (Sep 21, 2022):

I needed to do this. In a cram session, I needed to add two dozen chapters and two dozen pages to each chapter. Initially, the pages were to be blank (titles only), to be filled in later.

After creating a page, I had to go back to the Chapter to access the New Page button.

The solution I implemented is as follows:

  1. Copy /resources/views/pages/show.blade.php to /themes/your_theme/pages/.
  2. Near line 146, find:
            {{--User Actions--}}

Add after:
            @if(userCan('page-create', $page->chapter))
                <a href="{{ $page->chapter->getUrl('/create-page') }}" class="icon-list-item">
                    <span>@icon('add')</span>
                    <span>Sibling Page</span>
                </a>
            @endif

This was taken from the /chapters/show.blade.php file, and slightly modified, because when viewing a page, the $chapter variable is not set, but $page->chapter is usable.

When viewing a page, there is now a link for adding a 'sibling page' in the same chapter.

Soon, I will do the same for Chapters - adding a sibling chapter link for the same book (without first having to view the Book page).

Thanks for the work so far. Hopefully this can be merged into a upcoming release.

@athornfam2 commented on GitHub (Sep 21, 2022): > I needed to do this. In a cram session, I needed to add two dozen chapters and two dozen pages to each chapter. Initially, the pages were to be blank (titles only), to be filled in later. > > After creating a page, I had to go back to the Chapter to access the New Page button. > > The solution I implemented is as follows: > > 1. Copy /resources/views/pages/show.blade.php to /themes/`your_theme`/pages/. > 2. Near line 146, find: > > ``` > {{--User Actions--}} > > Add after: > @if(userCan('page-create', $page->chapter)) > <a href="{{ $page->chapter->getUrl('/create-page') }}" class="icon-list-item"> > <span>@icon('add')</span> > <span>Sibling Page</span> > </a> > @endif > ``` > > This was taken from the /chapters/show.blade.php file, and slightly modified, because when viewing a page, the `$chapter` variable is not set, but `$page->chapter` is usable. > > When viewing a page, there is now a link for adding a 'sibling page' in the same chapter. > > Soon, I will do the same for Chapters - adding a sibling chapter link for the same book (without first having to view the Book page). Thanks for the work so far. Hopefully this can be merged into a upcoming release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2357