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

Dropdown in sidebar #40

Open
basicchip opened this issue Nov 27, 2023 · 7 comments
Open

Dropdown in sidebar #40

basicchip opened this issue Nov 27, 2023 · 7 comments

Comments

@basicchip
Copy link

basicchip commented Nov 27, 2023

Maybe I'm missing where it is in blog options

With dropdown in sidebar--
blog v or blog ^
item

without
blog
item

Sometimes I see (and what I want as an option)
blog --- and this one will display the blog page with max item count when selected

@pmoreno-rodriguez
Copy link
Owner

Hi @basicchip
I don't understand very well what you want.
Could you explain it with more details and with a real sample?

@basicchip
Copy link
Author

I have more than 1 blog in my website.

Sometimes a blog will appear as

blog v

But sometimes they just appear as

blog

I want to be able to control that, but not sure how. It worked the way I wanted accidently at

my website

CLUB BUSINESS shows the dropdown, but NEWS, COACHS CORNER, PHOTO ARCHIVE and RANKINS do not

Actually this IS the way I want it to work. but this only happened by accident, and I want to control that

@pmoreno-rodriguez
Copy link
Owner

pmoreno-rodriguez commented Nov 29, 2023

Have you got NEWS, COACHS CORNER, PHOTO ARCHIVE and RANKINS visible in advanced options, in admin panel?

Navigation show drop-down if the menu item is visible and has children. If you want an item is displayed in menu it should be visible.

@basicchip
Copy link
Author

basicchip commented Nov 30, 2023

OK I see the difference between BLOG and PARENT MENU in your example. But I still see at times that BLOG can become a cascade in my pages

I'm going to add this to macros.html.twig which will fix it in my case

    {% if ( p.template == "default" ) and (p.children.visible.count > 0) %}

Other notes - when blog items are in date descending order, seem like NEXT and PREVIOUS are really reversed, as you are going back in time in pagination and item.

I'd still like to buy you some beers, but the github thinks I'm a robot, having gone through bicycle, bus, stairs traffic light and ...

@pmoreno-rodriguez
Copy link
Owner

I'll review it for a future version. Maybe I need to set a conditional that checks if the blog collection is sorted ascending or descending

@pmoreno-rodriguez
Copy link
Owner

@basicchip Can you put here the .md code from parent pages with children? Maybe I could see if you have the code with the correct options to show in sidebar menu.

@pmoreno-rodriguez
Copy link
Owner

OK I see the difference between BLOG and PARENT MENU in your example. But I still see at times that BLOG can become a cascade in my pages

I'm going to add this to macros.html.twig which will fix it in my case

    {% if ( p.template == "default" ) and (p.children.visible.count > 0) %}

Other notes - when blog items are in date descending order, seem like NEXT and PREVIOUS are really reversed, as you are going back in time in pagination and item.

I'd still like to buy you some beers, but the github thinks I'm a robot, having gone through bicycle, bus, stairs traffic light and ...

Grav's default behavior for navigation is as follows:

  • If the 'visible' property is not set, Grav sets it to true, if the page has numbering set, (01.home, 02.page, etc). If numbering is not set and visible is not selected, it will not be displayed.

You should check if the child pages of a parent page are numbered, if so they will be shown in the menu even if there is no visible marking.

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

No branches or pull requests

2 participants