sq/missing-meta-data.sql

              SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
              SELECT 'breadcrumb' as component;
WITH RECURSIVE breadcrumbs AS (
    SELECT
        COALESCE(abbreviated_caption, caption) AS title,
        COALESCE(url, path) AS link,
        parent_path, 0 AS level,
        namespace
    FROM sqlpage_aide_navigation
    WHERE namespace = 'prime' AND path='sq/missing-meta-data.sql'
    UNION ALL
    SELECT
        COALESCE(nav.abbreviated_caption, nav.caption) AS title,
        COALESCE(nav.url, nav.path) AS link,
        nav.parent_path, b.level + 1, nav.namespace
    FROM sqlpage_aide_navigation nav
    INNER JOIN breadcrumbs b ON nav.namespace = b.namespace AND nav.path = b.parent_path
)
SELECT title ,      
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link as link        
FROM breadcrumbs ORDER BY level DESC;
              -- not including page title from sqlpage_aide_navigation
              

              -- Define tabs
SELECT
  'tab' AS component,
  TRUE AS center;

-- Tab 1: Open Graph Missing URLs
SELECT
  'Open Graph Missing URLs' AS title,
  sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/sq/missing-meta-data.sql?hostname=' || $hostname::TEXT || '&tab=open_graph' AS link,
  $tab = 'open_graph' AS active;

-- Tab 2: Meta Tags Missing URLs
SELECT
  'Meta Tags Missing URLs' AS title,
  sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/sq/missing-meta-data.sql?hostname=' || $hostname::TEXT || '&tab=html_meta_data' AS link,
  $tab = 'html_meta_data' AS active;

-- Define component type based on active tab
SELECT
  CASE
    WHEN $tab = 'open_graph' THEN 'table'
    WHEN $tab = 'html_meta_data' THEN 'table'
  END AS component,TRUE AS sort,TRUE AS search,'URL' AS align_left,'Property Name' AS align_left;

-- Conditional content based on active tab
-- Tab-specific content for "open_graph"
SELECT
  property_name AS "Property Name",uri AS "URL"
FROM uniform_resource_uri_missing_open_graph
WHERE $tab = 'open_graph'
AND uri LIKE '%' || $hostname::TEXT || '%';

-- Tab-specific content for "html_meta_data"
SELECT
  uri AS "URL", property_name AS "Property Name"
FROM uniform_resource_uri_missing_html_meta_data
WHERE $tab = 'html_meta_data'
AND uri LIKE '%' || $hostname::TEXT || '%';