Industry & Types template pages (#226)
* Industry & Types template pages * fix sitemap for templates
This commit is contained in:
@@ -36,6 +36,8 @@ class SeoMetaResolver
|
||||
'integrations' => '/integrations',
|
||||
'templates' => '/form-templates',
|
||||
'templates_show' => '/form-templates/{slug}',
|
||||
'templates_types_show' => '/form-templates/types/{slug}',
|
||||
'templates_industries_show' => '/form-templates/industries/{slug}',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -192,4 +194,26 @@ class SeoMetaResolver
|
||||
'image' => $template->image_url
|
||||
];
|
||||
}
|
||||
|
||||
private function getTemplatesTypesShowMeta(): array
|
||||
{
|
||||
$types = json_decode(file_get_contents(resource_path('data/forms/templates/types.json')), true);
|
||||
$type = $types[array_search($this->patternData['slug'], array_column($types, 'slug'))];
|
||||
|
||||
return [
|
||||
'title' => $type['meta_title'],
|
||||
'description' => Str::of($type['meta_description'])->limit(140),
|
||||
];
|
||||
}
|
||||
|
||||
private function getTemplatesIndustriesShowMeta(): array
|
||||
{
|
||||
$industries = json_decode(file_get_contents(resource_path('data/forms/templates/industries.json')), true);
|
||||
$industry = $industries[array_search($this->patternData['slug'], array_column($industries, 'slug'))];
|
||||
|
||||
return [
|
||||
'title' => $industry['meta_title'],
|
||||
'description' => Str::of($industry['meta_description'])->limit(140),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user