Customizing Menus In Finzo
Files: src/config/menu.<lang>.json · Skill level: Beginner
Finzo has one menu file for each language: src/config/menu.en.json, menu.fr.json, and menu.ar.json. Each file has two lists:
headerPrimary: the header menu, with dropdowns and mega menusfooter: the footer menu columns
In the Tina edition, you edit these under Menus at /admin/, per language. In the Sanity edition, the file doesn’t exist: open Content, your language, Menus in the Studio, then Header menu or Footer menu.
For how the menu behaves, and for keyboard support, see Navigation.
Header Menu Items
Each object in headerPrimary is a top-level menu item.
{ "enable": true, "name": "Home", "weight": 0, "url": "/"}name: text displayed in the headerurl: link destination. Use/pricing/for your own pages, and the language prefix is added for youenable:trueshows the item. An item withfalse, or with noenableat all, is hiddenweight: the position of the itemhasChildren: makes the item a dropdownhasMegaMenu: makes the item a mega menuchildren: the links inside a dropdownbadge: a small label or dot beside the name
Finzo Sorts The Menu Byweight
Finzo sorts the header menu by weight, not by the order in the file. Lower numbers come first. This applies at every level: top-level items, dropdown links, nested links, and mega menu groups and their links. An item with no weight goes last.
To move an item, change its weight, not only its place in the file.
Mega Menus
To enable a mega menu, set hasMegaMenu to true, and list groups of links in menus. You can add a cta photo card and a bar row along the bottom.
{ "enable": true, "name": "Features", "weight": 1, "hasMegaMenu": true, "cta": { "enable": true, "image": "/images/menu-cta.png", "title": "Gain Actionable Insights", "description": "Launch faster, grow smarter, and scale effortlessly.", "button": { "enable": true, "hoverEffect": "text-flip", "label": "Get A Free Trial", "url": "/contact/" } }, "menus": [ { "enable": true, "name": "Platform", "weight": 0, "children": [ { "enable": true, "icon": "Focus", "name": "Real-Time Reporting", "description": "Monitor live data streams.", "url": "/features/", "weight": 0 } ] } ], "bar": { "enable": true, "text": "Not sure where to start?", "label": "Talk to us", "url": "/contact/" }}menus: groups of links, each with its ownnameandweighticon: a Lucide icon namedescription: supporting text under the linkcta: the photo card in the mega menubar: the row along the bottom of the panel
Dropdowns And Nested Menus
Give an item "hasChildren": true and a children list. Any child can have its own hasChildren and children, and it opens to the side.
{ "name": "Pages", "enable": true, "weight": 2, "hasChildren": true, "children": [ { "enable": true, "name": "About", "url": "/about/", "weight": 0 }, { "enable": true, "name": "Integration", "weight": 1, "hasChildren": true, "children": [ { "enable": true, "name": "All Integrations", "url": "/integration/", "weight": 0 } ] } ]}In the files, you can nest as deep as you like. The Tina form has fields for at least four levels, counting the top item. After you add a deeper level in the file, run npm run tina:generate and the form follows it.
Menu Badges
Badges highlight important links, such as updates or new sections. A badge shows only when its own enable is true.
{ "enable": true, "name": "Components", "url": "/components/", "weight": 3, "badge": { "enable": true, "label": "NEW", "color": "accent", "type": "text" }}enable: shows the badgelabel: badge textcolor:accent,info,success,danger, ordarktype:textordot
Mega menu links show text badges only, not dots.
Footer Menu
The footer list holds the footer columns. Each object is one column.
{ "label": "Services", "list": [ { "enable": true, "name": "Cards", "url": "/", "weight": 0 } ]}label: the column headinglist: the links in the column
Finzo shows every column and every link here, in the order in the file. enable and weight have no effect in the footer, so delete a link to remove it. The sample links mostly point at /, so set them to your own pages.
Other Footer Text
Some footer content isn’t in the menu file:
- Description and copyright:
footerBlockinsrc/i18n/<lang>.json. See Footer. - Contact column: its heading is
contactBlockLabelinfooterBlock. Your address, phone, and email arecontactInfoin the same file. - App store buttons:
[[settings.downloadButtons]]insrc/config/config.toml.
"footerBlock": { "description": "We provide seamless solutions to Small and Medium Businesses.", "copyright": "Copyright © 2024 Finzo. All Rights Reserved.", "contactBlockLabel": "Contact"}Update these in every language. In the Tina and Sanity editions, footerBlock and contactInfo are Footer Block and Contact Info in Interface labels, and the buttons are Download Buttons under Site settings > Settings.
Do It With AI
Add a link called "[NAME]" to [PLACE IN THE HEADER MENU], pointing to [URL]. Edit headerPrimary inevery src/config/menu.<lang>.json file, and translate the name for each language. Finzo sorts theheader menu by weight, so give the item a weight that puts it in the right place. Keep the sameitem shape as the existing items, with "enable": true. Don't change the navigation components.Then run npm run astro-check.