How can I define a custom menu bar using Liquid in my Dawn theme?

Hey Guys,

i am currently trying to get my head arround theme/template development with liquid and i seem to miss a point here. I really checked the docs extensively but i dont find an answer to that question.

I am using the Dawn-theme as a startingpoint and i am trying to make some changes.

I want to define my own main-menu. Therefor i defined a linklist with my desired properties. But i can’t figure out, where i have to drop that linklist that i will be used for my menu or at least not throwing an error.

I was searching for the default-menu in the code, but i couldnt find anything that relates to this, so it seems the menu-information are fetched from another ressource here and are not defined within the liquid code.

Of course i could define this in the editor, but i would really prefer having it in the code. Especially if i want to provide these themes to thirdparty-users.

So the question basically is, how can i define the structure of the menu within my liquid-code and where do i have to drop these definition, that it can be accessed by that

{%- for link in section.settings.menu.links -%}

iteration.

Thanks in advance and sorry if this is a duplicate. I couldnt find anything that helps me out here. I propably miss a point here, but it seems i can’t figure this out on my own. :slightly_smiling_face:

1 Like