Skip to content

Conversation

@andrewsinnovations
Copy link
Contributor

Allows the user to have SQL that indicates that a navigation bar should be shown as "active" in the shell.

select
  'shell' as component
  , '{"title": "Example Menu Item 1", "active": true}' as menu_item
  , '{"title": "Example Menu Item 2"}' as menu_item

shell

Also works in the sidebar:

select
  'shell' as component
  , true as sidebar
  , '{"title": "Example Menu Item 1", "active": true}' as menu_item
  , '{"title": "Example Menu Item 2"}' as menu_item

sidebar

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewsinnovations
Copy link
Contributor Author

Done! Updated example 1 to mark one page as active in the documentation and added some text to reflect that.

@lovasoa
Copy link
Collaborator

lovasoa commented May 4, 2025

Example 1 is the menu that is actually used in the official website. This change would mark the "About" menu as active on all pages !

@andrewsinnovations
Copy link
Contributor Author

I pulled out the active flag example into its own example with a description of the SQL. Let me know if that is better!

@lovasoa lovasoa merged commit 275b44a into sqlpage:main May 6, 2025
9 checks passed
@lovasoa
Copy link
Collaborator

lovasoa commented May 6, 2025

Thank you @andrewsinnovations !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants