eddiesigner / liebling

Beautiful and clean Ghost theme that is easy and comfortable to use. To get the latest version please head over the releases page 👉🏼
https://github.com/eddiesigner/liebling/releases
MIT License
1.25k stars 597 forks source link

Secondary Navigation Menu customization help #455

Closed jonwsoto closed 2 years ago

jonwsoto commented 2 years ago

Hello, I was wondering if it was possible to limit or specify the number of items on the secondary navigation menu that says "More".

Currently it is pulling all that are added into the secondary navigation menu.

What I am trying to accomplish is one drop down menu that pulls only the 1st to 4th items in the admin panel secondary navigation and another drop down menu that let's say pulls 5th to 9th. Or another solution is to explicitly state what secondary navigations from the admin panel to pull for each drop down menu.

eddiesigner commented 2 years ago

It's possible to limit the number of items in the secondary navigation menu or choose a subset of items based on their index.

If you want to limit the number of items to 3 for example you can do the following:

  1. Unzip the theme file

  2. Open the file partials/navigation.hbs with a code editor

  3. Replace this line: {{#foreach navigation}}

with this one:

{{#foreach navigation limit="3"}}

  1. Save your changes

  2. Zip the theme folder and upload it again

You can also choose a subset of items to be displayed based on their index as follows:

{{#foreach navigation from="2" to="5"}}

You can learn more in the Ghost docs.

However, at the moment is not possible to add a second dropdown without modifying several source files, I can't explain here all necessary changes because a lot needs to be changed, sorry.

eddiesigner commented 2 years ago

I will close this issue for now, please feel free to open another one if needed.