Customizing Menus in Folex Theme
Files: src/config/menu.<lang>.json · Skill level: Beginner
Each language has its own menu file: src/config/menu.en.json, src/config/menu.fr.json, and src/config/menu.ar.json. Each file holds these lists:
headerPrimary: the header menu, with its dropdowns and mega menufooterPrimary,footerSecondary,footerTertiary: the footer menus
In the Tina edition, edit Menus at /admin/, then the file for your language, with Header Primary, Footer Primary, Footer Secondary, and Footer Tertiary. In the Sanity edition, open Menus for your language in the Studio, with Header menu, Footer links, Footer legal links, and Second footer layout: links.
Header Navigation (Main Menu)
The headerPrimary array holds the items for your main navigation bar.
Items show in the order they have in the file. Folex doesn’t sort them, so to move an item, move it in the file. Each item has a weight number too: keep it in step with the order, but it doesn’t change anything in this theme.
Example
{ "name": "Pages", "enable": true, "hasChildren": true, "children": [ { "enable": true, "name": "About Us", "url": "/about/", "weight": 1 } ], "weight": 1}Key Properties
name: Menu label displayed in the header.url: Where the menu item links to.enable: Set tofalseto hide this item.hasChildren: If the menu item has a dropdown or submenu. A child can have its ownhasChildrenandchildren, which opens a flyout.children: An array of submenu items.badge: Optional visual badge (e.g., “NEW”, “FREE”) withenable,label,color, andtype.
For all the fields and keyboard support, see Navigation.
Badge Settings
You can highlight menu items using badges — small visual markers such as “NEW”, “FREE”, or colored dots.
Example:
{ "enable": true, "name": "Elements", "url": "/elements/", "badge": { "enable": true, "label": "NEW", "color": "accent", "type": "text" }, "weight": 2}enable: Set totrueto show the badge.label: Text displayed inside the badge (e.g.,"NEW").color: Visual style of the badge. Supported values:"primary","accent","info","success","danger".type: Choose"text"for a label or"dot"for a simple indicator.
Mega Menu Setup
To enable a mega menu, set hasMegaMenu to true and list groups of links in menus. cta adds the photo card, and bar adds the row along the bottom. This is the Services item in Folex, shortened:
{ "enable": true, "name": "Services", "hasMegaMenu": true, "menus": [ { "enable": true, "name": "Services", "weight": 0, "children": [ { "enable": true, "name": "Branding Design", "description": "A short line about this link", "icon": "Palette", "url": "/services/branding-design/", "weight": 0 } ] } ], "cta": { "enable": true, "eyebrow": "Testimonial", "image": "/images/customers/image.png", "title": "A 25% increase in revenue", "description": "One short sentence.", "items": [], "button": { "enable": true, "label": "Get in touch", "url": "/contact/" } }, "bar": { "enable": true, "text": "Have a project in mind?", "label": "Let’s talk", "url": "/contact/" }, "weight": 0}Footer Menus
Folex has three footer menus, and each footer layout uses different ones:
| Menu | Holds in the demo | Shown in |
|---|---|---|
footerPrimary | Main links | footer-1 |
footerSecondary | Privacy and terms | footer-1 |
footerTertiary | Links | footer-2, under the menuTitleLinks title |
footer-3 has no menu.
Each footer array includes objects like:
{ "enable": true, "name": "Privacy policy", "url": "/privacy-policy/"}How to Edit Menus
- Open the
menu.en.jsonfile insrc/config. - Locate the section you want to edit:
headerPrimary,footerPrimary, etc. - Update the
name,url, orenablefields. - Save the file and refresh the page.
- Do the same in the menu file of every other language.
Disabling a Menu Item
To hide a menu item without deleting it:
{ "enable": false, "name": "Careers", "url": "/careers/"}Update Footer Menu Titles
In footer-2, the menu and your contact details have the titles Links and Contact. You can customize these titles by editing your language files.
Steps to Update
-
Open the file:
src/i18n/en.json -
Find the
footersection, which looks like this:"footer": {"menuTitleLinks": "Links","contact": "Contact","copyright": "Copyright © {{ year }} Folex","description": ""} -
Modify the text values to suit your brand. For example:
"footer": {"menuTitleLinks": "Quick Links","contact": "Contact Us","copyright": "© {{ year }} YourBrandName. All rights reserved."} -
Update the
footerentries in your other language files (such asfr.jsonandar.json) to keep the footer consistent for all users.
Do It With AI
Add a link called "[NAME]" to [/url/] in the footerTertiary menu, in every src/config/menu.*.jsonfile. Translate the name for each language. Keep the same item shape as the existing items, anddon't change the components. Then run npm run astro-check.