Basic Usage
Layout and Appearance
Page title shown in the browser tab and top bar
Different title for the navigation bar (if different from page title)
Page description for search engines and social media
Icon to display next to the title (from tabler-icons.io)
Image URL to display next to the title
URL to navigate to when clicking the title/logo
Page layout:
boxed (default), horizontal (full-width menu), vertical (vertical menu), or fluid (no side margins)Set to
dark for dark themeCSS class to add to the html element
Navigation
Menu items in the navigation bar. Can be a simple string (links to
name.sql) or JSON object for advanced menus with dropdowns.Display menu on the left side instead of top
Set to
dark to use dark theme for sidebar onlyFix the navigation bar at the top when scrolling
Search
SQL file to load with a
search parameter when users searchPre-fill the search field with this value (use
$search to mirror user input)Placeholder text in the search field
Text on the search button
Styling
URL of a CSS file to load. Can be specified multiple times.
URL of a JavaScript file to load. Can be specified multiple times.
URL of a JavaScript ESM module to load
Font name from fonts.google.com or path to local WOFF2 file (e.g.,
/fonts/MyFont.woff2)Base font size in pixels
Metadata
URL of the favicon icon for browser tabs and bookmarks
Image URL for link previews when shared on social media
Alias for preview_image
Page language code (e.g.,
en-US, fr-FR) for search engines and screen readersDisplay page in right-to-left mode for Arabic, Hebrew, Persian, etc.
Prevent search engines from indexing this page
URL of RSS feed to display in navigation
URL of PWA manifest.json for installable web apps
Footer
Markdown text for the page footer. Set to empty string to hide footer. Default: “Built with SQLPage”
Special Features
Number of seconds before auto-refreshing the page
Where to open navigation links:
_blank, _self, _parent, or _topExamples
Basic Shell
Shell with Simple Menu
about.sql, contact.sql, and docs.sql.
Shell with Dropdown Menu
Active Menu Item
Shell with Sidebar
Shell with Search
Dark Theme
Custom Font and Size
Custom CSS and JavaScript
Auto-Refresh Page
Right-to-Left Languages
Sharing Shell Across Pages
Static Menu with JSON File
Createshell.json:
Dynamic Menu from Database
Createshell.sql:
Conditional Menu Items
Shell-Empty
Useshell-empty to return raw content without SQLPage’s HTML wrapper:
Layout Modes
- boxed: Default centered layout with margins
- horizontal: Full-width with horizontal top menu
- vertical: Vertical sidebar menu
- fluid: Full-width without side margins
Best Practices
- Define the shell once at the top of each page
- Use
dynamiccomponent to share shell configuration - Set
descriptionandpreview_imagefor better SEO and social sharing - Use
fixed_top_menufor long scrolling pages - Add
norobotto admin or private pages - Use
sidebarlayout for applications with many menu items
Related Components
- breadcrumb - Add breadcrumb navigation
- authentication - Protect your pages