More consistency in URL / navigation / breadcrums #4210

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

Originally created by @HA-TB303 on GitHub (Sep 14, 2023).

Describe the feature you'd like

More or less all the same thing:

  • Add the "shelf" to the breadcrum.
  • Make navigation more consistent
  • Make URL more consistent

Describe the benefits this would bring to existing BookStack users

It is sometimes very confusing to find the right shelf if you only have the URL to a specific page.
The breadcrum of this URL https://bookstack.url/books/test-book/page/test-book now consists of:
[Books] > [test-book] > [test-chapter] > [test-page]
The shelf is missing in the breadcrum and in the URL.

More logical and consistent would be:

https://bookstack.url/shelf-name/book-name/chapter-name/page-name
Shelf: [Shelf-name] > Book: [book-name] > Chapter: [chapter-name] > Page: [page name]

Screenshots:
CleanShot 2023-09-14 at 12 03 27

The only (known) way to find the corresponding shelf is to search for the page name and then click it:
CleanShot 2023-09-14 at 12 16 12

But also in the "book navigation" the shelf is missing.

Hope I was able to clarify ;)

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

Ony when using search and search for "page name", and click on the page.

Have you searched for an existing open/closed issue?

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

How long have you been using BookStack?

1 to 5 years

Additional context

This is the only thing about bookstack that has been nagging me so far after very actively using it for 3 years.
Keep up the good work!

Originally created by @HA-TB303 on GitHub (Sep 14, 2023). ### Describe the feature you'd like More or less all the same thing: - Add the "shelf" to the breadcrum. - Make navigation more consistent - Make URL more consistent ### Describe the benefits this would bring to existing BookStack users It is sometimes very confusing to find the right shelf if you only have the URL to a specific page. The breadcrum of this URL https://bookstack.url/books/test-book/page/test-book now consists of: [Books] > [test-book] > [test-chapter] > [test-page] The shelf is missing in the breadcrum and in the URL. More logical and consistent would be: https://bookstack.url/shelf-name/book-name/chapter-name/page-name Shelf: [Shelf-name] > Book: [book-name] > Chapter: [chapter-name] > Page: [page name] Screenshots: ![CleanShot 2023-09-14 at 12 03 27](https://github.com/BookStackApp/BookStack/assets/9609805/257ce8ec-142a-45ed-83d8-43d181787f3f) The only (known) way to find the corresponding shelf is to search for the page name and then click it: ![CleanShot 2023-09-14 at 12 16 12](https://github.com/BookStackApp/BookStack/assets/9609805/1088ccad-39af-49d8-93dc-4bd5b9b6e366) But also in the "book navigation" the shelf is missing. Hope I was able to clarify ;) ### Can the goal of this request already be achieved via other means? Ony when using search and search for "page name", and click on the page. ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundamental request ### How long have you been using BookStack? 1 to 5 years ### Additional context This is the only thing about bookstack that has been nagging me so far after very actively using it for 3 years. Keep up the good work!
OVERLORD added the 🔨 Feature Request label 2026-02-05 08:15:05 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Hi @HA-TB303,
It might be worth reading through #4529 to understand why the url/breadcrumb handling is like this.

@ssddanbrown commented on GitHub (Sep 14, 2023): Hi @HA-TB303, It might be worth reading through #4529 to understand why the url/breadcrumb handling is like this.
Author
Owner

@HA-TB303 commented on GitHub (Sep 19, 2023):

Thanks for that clarification.

We work together with 6 people on the same bookstack (internal documentation) and more or everyone of the 6 people still find this confusing and inconsistent. If you do not know the shelf the book is in, it's hard to find other stuff in the same shelf if you only have to link to a specific page.

I am strictly (re)viewing this from a end-user perspective.

@HA-TB303 commented on GitHub (Sep 19, 2023): Thanks for that clarification. We work together with 6 people on the same bookstack (internal documentation) and more or everyone of the 6 people still find this confusing and inconsistent. If you do not know the shelf the book is in, it's hard to find other stuff in the same shelf if you only have to link to a specific page. I am strictly (re)viewing this from a end-user perspective.
Author
Owner

@Man-in-Black commented on GitHub (Sep 19, 2023):

As far as I'm aware of if you're viewing at the book level you can see the shelve it is in on the left side:
image

Only from a page view this information is missing.

@Man-in-Black commented on GitHub (Sep 19, 2023): As far as I'm aware of if you're viewing at the book level you can see the shelve it is in on the left side: ![image](https://github.com/BookStackApp/BookStack/assets/9048534/c3d4d097-72fc-4175-bdf7-a1a32b277e59) Only from a page view this information is missing.
Author
Owner

@HA-TB303 commented on GitHub (Sep 19, 2023):

That is correct. Hence the request for more consistency. There is a few more places where the breadcrum and/or the left pane is not completely consistent. Correcting that would put the cherry on the pie ;)

@HA-TB303 commented on GitHub (Sep 19, 2023): That is correct. Hence the request for more consistency. There is a few more places where the breadcrum and/or the left pane is not completely consistent. Correcting that would put the cherry on the pie ;)
Author
Owner

@david-prv commented on GitHub (Sep 19, 2023):

I'd also like to add that I too would consider a change to the breadcrumbs to be more userfriendly.
For example, if I open a URL to a book directly from a permanent link, but have to log in first, the breadcrumb will be confused; in that case, couldn't you just lookup the parent shelves and complement the breadcrumb with what's missing?

@david-prv commented on GitHub (Sep 19, 2023): I'd also like to add that I too would consider a change to the breadcrumbs to be more userfriendly. For example, if I open a URL to a book directly from a permanent link, but have to log in first, the breadcrumb will be confused; in that case, couldn't you just lookup the parent shelves and complement the breadcrumb with what's missing?
Author
Owner

@Man-in-Black commented on GitHub (Sep 19, 2023):

I think the problem could be that a book can reside in more than one shelf.
So if you have a direct link to a book there is no way to show the right shelve in the breadcrumb navigation.
only the part on the left may work.
Maybe it is possible to add this block to the page view, too.

@Man-in-Black commented on GitHub (Sep 19, 2023): I think the problem could be that a book can reside in more than one shelf. So if you have a direct link to a book there is no way to show the right shelve in the breadcrumb navigation. only the part on the left may work. Maybe it is possible to add this block to the page view, too.
Author
Owner

@Man-in-Black commented on GitHub (Sep 19, 2023):

Ok small update: I've build it with the awesome visual theme system and it seems to work fine.
Just add the following lines to themes/custom/pages/show.blade.php on your desired location:

@php
$bookParentShelvess = $book->shelves()->scopes('visible')->get();
@endphp
@if(count($bookParentShelvess) > 0)
    <div class="actions mb-xl">
        <h5>{{ trans('entities.shelves') }}</h5>
        @include('entities.list', ['entities' => $bookParentShelvess, 'style' => 'compact'])
    </div>
@endif

I changed the variable name with an additional "s" to not mess around with the original variable.

The result looks like that (german bookstack) on the left top over the page navigation on my case:
image

In my opinion this is the only way to show in which of more than one shelf a page resides in.
the breadcrumb still is working correct by showing the "one" shelves from which you originated.

edit: you can also but the code on any other show.blade.php I think, eg. on the chapter blade.

@Man-in-Black commented on GitHub (Sep 19, 2023): Ok small update: I've build it with the awesome visual theme system and it seems to work fine. Just add the following lines to `themes/custom/pages/show.blade.php` on your desired location: ~~~ @php $bookParentShelvess = $book->shelves()->scopes('visible')->get(); @endphp @if(count($bookParentShelvess) > 0) <div class="actions mb-xl"> <h5>{{ trans('entities.shelves') }}</h5> @include('entities.list', ['entities' => $bookParentShelvess, 'style' => 'compact']) </div> @endif ~~~ I changed the variable name with an additional "s" to not mess around with the original variable. The result looks like that (german bookstack) on the left top over the page navigation on my case: ![image](https://github.com/BookStackApp/BookStack/assets/9048534/c2e6e7b4-1151-4cd6-af3a-cb884df97c59) In my opinion this is the only way to show in which of more than one shelf a page resides in. the breadcrumb still is working correct by showing the "one" shelves from which you originated. edit: you can also but the code on any other show.blade.php I think, eg. on the chapter blade.
Author
Owner

@david-prv commented on GitHub (Sep 23, 2023):

I think the problem could be that a book can reside in more than one shelf.
So if you have a direct link to a book there is no way to show the right shelve in the breadcrumb navigation.
only the part on the left may work.

Absolutely. But the issue creator also mentioned the URLs: if I share a book with another colleague, then the order I went through the hierachy to reach that specific book/page, starting at the shelves, could be represented by the shared link (as proposed by TM). This way, the question about the ambiguous parent shelve would be solved, wouldn't it?

@david-prv commented on GitHub (Sep 23, 2023): > I think the problem could be that a book can reside in more than one shelf. > So if you have a direct link to a book there is no way to show the right shelve in the breadcrumb navigation. > only the part on the left may work. Absolutely. But the issue creator also mentioned the URLs: if I share a book with another colleague, then the order I went through the hierachy to reach that specific book/page, starting at the shelves, could be represented by the shared link (as proposed by TM). This way, the question about the ambiguous parent shelve would be solved, wouldn't it?
Author
Owner

@SirTwinkleberry commented on GitHub (Sep 24, 2023):

Ok small update: I've build it with the awesome visual theme system and it seems to work fine. Just add the following lines to themes/custom/pages/show.blade.php on your desired location:

@php
$bookParentShelvess = $book->shelves()->scopes('visible')->get();
@endphp
@if(count($bookParentShelvess) > 0)
    <div class="actions mb-xl">
        <h5>{{ trans('entities.shelves') }}</h5>
        @include('entities.list', ['entities' => $bookParentShelvess, 'style' => 'compact'])
    </div>
@endif

I changed the variable name with an additional "s" to not mess around with the original variable.

The result looks like that (german bookstack) on the left top over the page navigation on my case: image

In my opinion this is the only way to show in which of more than one shelf a page resides in. the breadcrumb still is working correct by showing the "one" shelves from which you originated.

edit: you can also but the code on any other show.blade.php I think, eg. on the chapter blade.

Thanks a lot, it's exactly what I was looking for... Again!

@SirTwinkleberry commented on GitHub (Sep 24, 2023): > Ok small update: I've build it with the awesome visual theme system and it seems to work fine. Just add the following lines to `themes/custom/pages/show.blade.php` on your desired location: > > ``` > @php > $bookParentShelvess = $book->shelves()->scopes('visible')->get(); > @endphp > @if(count($bookParentShelvess) > 0) > <div class="actions mb-xl"> > <h5>{{ trans('entities.shelves') }}</h5> > @include('entities.list', ['entities' => $bookParentShelvess, 'style' => 'compact']) > </div> > @endif > ``` > > I changed the variable name with an additional "s" to not mess around with the original variable. > > The result looks like that (german bookstack) on the left top over the page navigation on my case: ![image](https://user-images.githubusercontent.com/9048534/269086365-c2e6e7b4-1151-4cd6-af3a-cb884df97c59.png) > > In my opinion this is the only way to show in which of more than one shelf a page resides in. the breadcrumb still is working correct by showing the "one" shelves from which you originated. > > edit: you can also but the code on any other show.blade.php I think, eg. on the chapter blade. Thanks a lot, it's exactly what I was looking for... Again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4210