fix(videoGpt1): normalize seo pages and fallback services
This commit is contained in:
@@ -18,20 +18,27 @@ p_val="page_data" button_num="5" cache_life="3600" func="generateSearchPager" ex
|
||||
{block name="description"}{site:seotkd code="description" page="search" /}{/block}
|
||||
|
||||
{block name="head"}
|
||||
{php}
|
||||
$strSearchKeyword = trim((string)($Request->get('keyword', '')));
|
||||
$urlBuilder = new \app\common\helper\UrlBuilder($TpStyle);
|
||||
$strSearchCanonicalUrl = $strSearchKeyword !== ''
|
||||
? 'https://' . $DomainModel->d_domain . $urlBuilder->searchResult($strSearchKeyword)
|
||||
: 'https://' . $DomainModel->d_domain;
|
||||
{/php}
|
||||
|
||||
<meta name="robots" content="index,follow">
|
||||
|
||||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vsurl key="$Request.get.keyword" p="1"/}'>
|
||||
<link rel="canonical" href='{$strSearchCanonicalUrl}'>
|
||||
|
||||
<meta property="og:title" content='{site:seotkd code="title" page="search" /}'>
|
||||
<meta property="og:description" content='{site:seotkd code="description" page="search" /}'>
|
||||
<meta property="og:url" content='https://{$DomainModel->d_domain}{site:vsurl key="search_term_string" p="1"/}'>
|
||||
<meta property="og:url" content='{$strSearchCanonicalUrl}'>
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content='{$DomainModel->d_name}'>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content='{site:seotkd code="title" page="search" /}'>
|
||||
<meta name="twitter:description" content='{site:seotkd code="description" page="search" /}'>
|
||||
<meta name="twitter:image:alt" content="动作电影 搜索结果第1页">
|
||||
<meta name="twitter:image:alt" content="{if $strSearchKeyword !== ''}{$strSearchKeyword|raw} 搜索结果第{$resData.p_data.page|default=1}页{else/}{$DomainModel->d_name|raw} 搜索结果{/if}">
|
||||
|
||||
{// 结构化数据}
|
||||
<script type="application/ld+json">
|
||||
@@ -41,7 +48,7 @@ p_val="page_data" button_num="5" cache_life="3600" func="generateSearchPager" ex
|
||||
"name": "{$DomainModel->d_name}",
|
||||
"url": "https://{$DomainModel->d_domain}",
|
||||
"alternateName": "{$DomainModel->d_domain}",
|
||||
"description": "{site:replace code="VIDEO@INDEX@INDEX@DESCRIPTION"}",
|
||||
"description": "{site:seotkd code='description' page='home' /}",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": 'https://{$DomainModel->d_domain}{site:vsurl key="search_term_string" p="1"/}',
|
||||
@@ -52,41 +59,9 @@ p_val="page_data" button_num="5" cache_life="3600" func="generateSearchPager" ex
|
||||
{
|
||||
"@type": "CollectionPage",
|
||||
"name": "{$DomainModel->d_name} - {$DomainModel->d_logo_text}",
|
||||
"url": "https://{$DomainModel->d_domain}",
|
||||
"url": "{$strSearchCanonicalUrl}",
|
||||
"alternateName": "{$DomainModel->d_domain}",
|
||||
"description": '{site:seotkd code="description" page="search" /}',
|
||||
"mainEntity": {
|
||||
"@type": "ItemList",
|
||||
"itemListElement": [
|
||||
{volist name="resData.data" id="Video" key="key"}
|
||||
{if $key < 5 }
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {$key},
|
||||
"item": {
|
||||
"@type": "Movies",
|
||||
"name": "{$Video.v_name}",
|
||||
"url": 'https://{$DomainModel->d_domain}{site:vurl v_id="$Video.v_id" v_py="$Video.v_name_en"/}',
|
||||
"description": "{$Video.v_description}",
|
||||
"actor": [
|
||||
{foreach $Video.v_actor as $strActorKey=>$strActor }
|
||||
{if $strActorKey < 5 }
|
||||
{ "@type": "Person", "name": "{$strActor}" },
|
||||
{/if}
|
||||
{/foreach}
|
||||
],
|
||||
"numberOfEpisodes": {$Video.v_play_url|count},
|
||||
"image": "{$Video.v_pic}",
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "{$Video.v_score}",
|
||||
}
|
||||
}
|
||||
},
|
||||
{/if}
|
||||
{/volist}
|
||||
]
|
||||
}
|
||||
"description": '{site:seotkd code="description" page="search" /}'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
@@ -112,6 +87,14 @@ p_val="page_data" button_num="5" cache_life="3600" func="generateSearchPager" ex
|
||||
{assign name="__LIST__" value="$resData.data"}
|
||||
{include file="module/list/shell/_shell_router" /}
|
||||
|
||||
{video:seocopy scene="search"
|
||||
keyword="$Request.get.keyword"
|
||||
page="$resData.p_data.page|default=1"
|
||||
total="$resData.p_data.total|default=0"
|
||||
pages="$resData.p_data.pages|default=1"
|
||||
visible="$resData.data|count"
|
||||
export_name="seoCopy" /}
|
||||
{include file="module/seo_copy/collection" /}
|
||||
|
||||
{// ===== Pagination ===== }
|
||||
{php}
|
||||
@@ -129,4 +112,4 @@ $pagerCfg = $TpStyle['template_cfg']['components']['pager'] ?? [];
|
||||
{/block}
|
||||
{block name="customize"}
|
||||
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user