pmoreno-rodriguez / grav-theme-editorial

Editorial is a GravCMS port of the Editorial theme from HTML5Up.net.
Other
13 stars 2 forks source link

Dropdown in sidebar #40

Open basicchip opened 7 months ago

basicchip commented 7 months ago

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 commented 7 months ago

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

basicchip commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

@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 commented 5 months ago

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:

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.