Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested index pages not showing in navigation #1318

Closed
caendesilva opened this issue Mar 17, 2023 · 1 comment · Fixed by #1319
Closed

Nested index pages not showing in navigation #1318

caendesilva opened this issue Mar 17, 2023 · 1 comment · Fixed by #1319
Assignees

Comments

@caendesilva
Copy link
Member

Issue description

When having an index page in a subdirectory, it does not show up in navigation.

Steps to reproduce:

  1. Run the following commands:
mkdir _pages/test
echo '@dd($page->navigation)' >> _pages/test/index.blade.php
php hyde build
  1. Visit _site/test/index.html
  2. Look at the dumped data which looks as follows:
^ Hyde\Framework\Features\Navigation\NavigationData {#406 ▼
  +label: "Test"
  +priority: 999
  +hidden: true
  +group: null
}

Expected behavior:

The page should show up in navigation and $hidden should be false.

Actual behavior:

The page does not show up in navigation and $hidden is true.

Cause of the issue:

Unknown.

Possible solution:

Unknown.

@caendesilva caendesilva self-assigned this Mar 17, 2023
@caendesilva
Copy link
Member Author

caendesilva commented Mar 17, 2023

I think this is due to the hyde.navigation.subdirectories setting which defaults to hidden. We probably want a case similar to HydePageDataFactory::findTitleFromParentIdentifier so that when using the "hidden" setting, we use consider foo/index to be the same as foo and to use foo as the basis for the navigation title (which is the current label as it already is based on the parent title)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant