API Reference - SEO Templates
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108124
← Back to API Reference | Getting Started
SEO Templates
SEO Templates define the reusable SEO metadata patterns applied to dynamically generated pages such as category search results, service pages, and location pages. Each template uses token placeholders (EG %Profession_name%, %Service_name%) that are substituted at runtime to produce unique, keyword-rich titles and meta descriptions at scale. This is primarily a reference table used for GET operations; templates are typically managed through the admin panel.
list_seo_template — DB table: list_seo_templateThe SEO Template Object
| Field | Type | Description |
|---|---|---|
template_id | integer | Unique template ID (primary key, read-only) |
master_id | integer | Master record ID; 0 for site-level templates |
seo_type | string | Page type this template applies to (EG profile_search_results, category); max 255 characters |
database | string | Database table associated with this page type; max 255 characters |
section | string | Section or sub-type within the page type; max 255 characters |
database_id | integer | ID of the associated database record; 0 for global templates |
filename | string | URL pattern template for generated pages; supports token placeholders (EG %profession_name%/%service_name%); max 255 characters |
title | string | Title tag template; supports token placeholders (EG %Service_name% %%Profession_name%%); max 255 characters |
meta_keywords | string | Meta keywords template; supports token placeholders; max 255 characters |
meta_desc | string | Meta description template; supports token placeholders; max 255 characters |
seo_text | text | Additional SEO body text template; supports token placeholders |
facebook_title | string | Open Graph title template for social sharing; max 255 characters |
facebook_desc | string | Open Graph description template for social sharing; max 255 characters |
facebook_image | string | Open Graph image URL for social sharing; max 255 characters |
h1 | text | H1 heading template; supports token placeholders |
h2 | text | H2 heading template; supports token placeholders |
breadcrumb | text | Breadcrumb label template; supports token placeholders |
content_menu | string | Menu section this page type belongs to; max 255 characters |
nickname | string | Human-readable label for this template displayed in the admin panel; max 255 characters |
content_order | integer | Sort order for this template within its page type group |
content | text | Main HTML content template for generated pages; supports widget shortcodes |
content_footer | text | Footer content template for generated pages |
content_active | integer | Whether the content section is active; 1 = active, 0 = hidden |
show_form | integer | Whether to display a contact form on generated pages; 1 = show, 0 = hide |
form_name | string | Name of the form to display if show_form is enabled; max 255 characters |
content_images | text | JSON array of image references used in the template content |
date_updated | string | Timestamp of last update in YYYYMMDDHHmmss format; max 14 characters |
updated_by | string | Email or identifier of the admin who last updated this record; max 25 characters |
content_css | text | Custom CSS scoped to generated pages using this template |
menu_layout | string | Layout template to use for the navigation menu on generated pages; max 255 characters |
hide_from_menu | integer | Whether to hide generated pages from navigation menus; 1 = hidden, 0 = visible |
hide_header_links | integer | Whether to hide header navigation links on generated pages; 1 = hidden, 0 = visible |
hide_header | integer | Whether to hide the site header on generated pages; 1 = hidden, 0 = visible |
hide_footer | integer | Whether to hide the site footer on generated pages; 1 = hidden, 0 = visible |
hide_top_right | integer | Whether to hide the top-right header area on generated pages; 1 = hidden, 0 = visible |
content_group | string | Group label for organizing this template in the admin panel; max 255 characters |
content_settings | string | JSON object of additional page settings and layout options; max 255 characters |
content_layout | string | Layout variant to use for the content area of generated pages; max 255 characters |
content_head | text | HTML or widget shortcodes injected into the header area of generated pages |
content_sidebar | string | Sidebar configuration or widget shortcode for generated pages; max 255 characters |
revision_timestamp | timestamp | Last modified timestamp (auto-updated) |
allowed_products | string | Comma-separated list of plan/product IDs that can view generated pages; empty means all plans; max 255 characters |
content_footer_html | text | Raw HTML injected at the bottom of generated pages |
List SEO Templates
Returns a paginated list of SEO template records.
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/list_seo_template/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"template_id": "4",
"master_id": "0",
"seo_type": "profile_search_results",
"database": "users_data",
"section": "",
"database_id": "0",
"filename": "%profession_name%/%service_name%",
"title": "%Service_name% %%Profession_name%% - %%Profession_name%% Specializing in %Service_name%",
"meta_keywords": "%Profession_name%,%%Profession_name%%,%Service_name%",
"meta_desc": "Search our database of %%Profession_name%% specializing in %Service_name%%.",
"seo_text": "",
"facebook_title": "The Best %%Profession_name%% Offering %Service_name%%",
"facebook_desc": "Who is the best %Profession_name% specializing in %Service_name%?",
"facebook_image": "",
"h1": "",
"h2": "",
"breadcrumb": "",
"nickname": "Search Results - Members - Main / Sub Category",
"content_order": "0",
"content": "",
"content_active": "1",
"revision_timestamp": "2024-08-25 14:22:14"
}
],
"total": "18",
"current_page": 1,
"total_pages": 1
}Retrieve an SEO Template Record
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/list_seo_template/get/4" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"template_id": "4",
"master_id": "0",
"seo_type": "profile_search_results",
"database": "users_data",
"filename": "%profession_name%/%service_name%",
"title": "%Service_name% %%Profession_name%%",
"nickname": "Search Results - Members - Main / Sub Category",
"revision_timestamp": "2024-08-25 14:22:14"
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create an SEO Template Record
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/list_seo_template/create" \ -H "X-Api-Key: your-api-key-here" \ -d "seo_type=location_results" \ -d "database=users_data" \ -d "filename=%profession_name%/in/%location_name%" \ -d "title=%Profession_name%+in+%Location_name%+-+Find+Local+%Profession_name%" \ -d "nickname=Location+Search+Results" \ -d "content_active=1"
Example Response
{
"status": "success",
"message": {
"template_id": "19",
"seo_type": "location_results",
"database": "users_data",
"filename": "%profession_name%/in/%location_name%",
"title": "%Profession_name% in %Location_name% - Find Local %Profession_name%",
"nickname": "Location Search Results",
"content_active": "1"
}
}Update an SEO Template Record
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/list_seo_template/update" \ -H "X-Api-Key: your-api-key-here" \ -d "template_id=19" \ -d "meta_desc=Find+the+best+%Profession_name%+in+%Location_name%.+Compare+and+connect+today."
Example Response
{
"status": "success",
"message": {
"template_id": "19",
"seo_type": "location_results",
"filename": "%profession_name%/in/%location_name%",
"title": "%Profession_name% in %Location_name% - Find Local %Profession_name%",
"meta_desc": "Find the best %Profession_name% in %Location_name%. Compare and connect today."
}
}Delete an SEO Template Record
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/list_seo_template/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "template_id=19"
Example Response
{
"status": "success",
"message": "list_seo_template record was deleted"
}