Footer Configuration
The footer is configured through the Footer document type in Sanity CMS.
Overview
The footer includes navigation menus, copyright information, contact details, and optional referral program sections. The footerText field has been moved from siteSettings to the Footer document for better organization.
Footer Text Location
Migration
The footerText field has been moved from siteSettings to the Footer document type.
Before:
siteSettings.footerText
After:
footer.footerText
Migration Steps
If you have existing footerText in siteSettings, you should:
- Copy the value to the
Footerdocument - Remove it from
siteSettings(optional, but recommended)
See Migration Guide for detailed instructions.
Schema Structure
The Footer document includes:
footerText(localized text): Main footer description textmenus(array): Navigation menus for footercopyright(object): Copyright informationreferral(object, optional): Referral program section
Footer Schema Example
{
name: 'footer',
type: 'document',
title: 'Footer',
fields: [
{
name: 'footerText',
type: 'object',
title: 'Footer Text',
fields: [
{ name: 'en', type: 'text' },
{ name: 'es', type: 'text' },
{ name: 'ro', type: 'text' }
]
},
{
name: 'menus',
type: 'array',
of: [{ type: 'footerMenu' }]
},
{
name: 'copyright',
type: 'object',
fields: [
{ name: 'text', type: 'string' },
{ name: 'year', type: 'number' }
]
},
{
name: 'referral',
type: 'object',
fields: [
{ name: 'title', type: 'object' },
{ name: 'description', type: 'object' },
{ name: 'link', type: 'url' }
]
}
]
}
Footer Menus
Footer menus are organized in an array. Each menu can contain:
- Menu title (localized)
- Menu items (links)
- Menu sections
Menu Structure
{
name: 'footerMenu',
type: 'object',
fields: [
{
name: 'title',
type: 'object',
fields: [
{ name: 'en', type: 'string' },
{ name: 'es', type: 'string' },
{ name: 'ro', type: 'string' }
]
},
{
name: 'items',
type: 'array',
of: [{ type: 'menuItem' }]
}
]
}
Contact Information in Footer
The footer can display contact information including:
- Phone numbers (filtered by
displayLocation: ["footer"]) - Email address
- Social media links
- Physical address
See Contact Information for details on phone number configuration.
Copyright Information
Copyright information is displayed at the bottom of the footer:
- Copyright text (localized)
- Copyright year
- Company name
Referral Program (Optional)
The footer can include an optional referral program section:
- Title (localized)
- Description (localized)
- Link to referral program page
Localization
All footer content supports multiple languages:
- English (
en) - Spanish (
es) - Romanian (
ro)
The footer automatically displays content based on the current locale.
Frontend Implementation
The footer component:
- Fetches footer data from Sanity
- Renders menus, contact info, and copyright
- Handles localization automatically
- Displays phone numbers based on
displayLocation - Includes responsive design for mobile and desktop