sq/missing-meta-information/details.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
SELECT
'breadcrumb' AS component;
SELECT
'Home' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' as link;
SELECT
'Website Resources' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/sq' as link;
SELECT
'Social Media and SEO Metadata Analysis' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/sq/missing-meta-information.sql?hostname='||$hostname::TEXT||'' AS link;
SET total_rows = (SELECT COUNT(*) FROM uniform_resource_uri_missing_meta_info WHERE property_name=$property::TEXT AND uri LIKE '%'||$hostname::TEXT||'%');
SET limit = COALESCE($limit, 50);
SET offset = COALESCE($offset, 0);
SET total_pages = ($total_rows + $limit - 1) / $limit;
SET current_page = ($offset / $limit) + 1;
SELECT
'text' AS component,
'**Property Name:** ' || property_name || '
' ||
'**Description:** ' || description || '
' ||
'**Requirements:** ' || requirement || '
' ||
'**Impact of Missing Property:** ' || impact || '
' ||
'**Suggested Solution:** ' || suggested_solution || '
'
AS contents_md
FROM
site_quality_policy
WHERE
property_name = $property::TEXT;
SELECT
'title' AS component,
'URLs Missing the Property "'||$property::TEXT||'" for: '||$hostname::TEXT||'' as contents,
3 AS level;
SELECT
'table' AS component,
TRUE AS sort,
TRUE AS search;
SELECT
ROW_NUMBER() OVER () AS "Sl.No",
uri AS "Website URL"
FROM uniform_resource_uri_missing_meta_info WHERE property_name=$property::TEXT AND uri LIKE '%'||$hostname::TEXT||'%'
LIMIT $limit
OFFSET $offset;
SELECT 'text' AS component,
(SELECT CASE WHEN $current_page > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || ')' ELSE '' END) || ' ' ||
'(Page ' || $current_page || ' of ' || $total_pages || ") " ||
(SELECT CASE WHEN $current_page < $total_pages THEN '[Next](?limit=' || $limit || '&offset=' || ($offset + $limit) || ')' ELSE '' END)
AS contents_md
;