Trouble getting navigation.hbs to get recognized

I’m new to Ghost theme development, but have used Handlebars for a long time, so the syntax all makes sense. However, I’m having trouble getting my navigation.hbs file to be seen by Ghost.

I’ve followed the documentation here - https://ghost.org/docs/themes/helpers/navigation/

In my theme, I’ve created a ‘partials’ folder and a ‘navigation.hbs’ file with my updated nav HTML. I’ve ensured both are spelled correctly.

Then I’m calling {{navigation}} and {{navigation type="secondary"}} in the correct places. But no matter what I do it’s showing the default template.

I’ve tried restarting Ghost, clearing cache and re-uploading my theme and even a fresh install and still no luck. Any help would be appreciated!

I’ve realized that Ghost simply can’t read any partial overrides. I’m also having trouble getting it to recognize pagination.hbs.

Is there some setting I’m missing or need to enable somewhere?

That sounds frustrating.

There isn’t anything additional you need to do and nothing immediately comes to mind about why it isn’t working.

Where is your partial folder located?

Are custom partials working?

Do you get any gscan errors? https://gscan.ghost.org/

I use a custom navigation partial in my theme. Here’s my repo for reference: GitHub - royalfig/smart: A theme for the open source Ghost CMS.

Thanks @TheRoyalFig

The folder is located in my root, same as your repo. (thanks for sharing by the way). Also, no errors in gscan.

Oddly, I wasn’t using any custom partials, just overrides. Once I added a custom one, they all showed up and worked, even the overrides. It’s almost as if Ghost didn’t see the folder until I added a custom partial.

Either way, it works now. Thanks for your help getting there!

1 Like

@timwco Thanks for that, I had the exact same problem. I just added a custom header.hbs in partials which loaded {{navigation}} and it loaded my overriden navigation :man_shrugging:

Okay, I’m having the same issue. However, even creating a custom partial doesn’t help. The issue appeared after updating Ghost. I have even tried reinstalling the theme, nothing.

Update: Fully reinstalled the Ghost instance with a fresh database and the issue persists.

So after hours of pulling on my hair and literally doing a fresh install of everything on the system, it did end up being a custom partial in the end. However there was definitely something else that initially went wrong with the update from the pulled 4.5 release to v4.37.