Article Source: www.bayinmao.com
Phpcms v9 single page call seo meta title and seo meta Keywords
because the single page is the default call SEO meta description, so now get a cut with SEO meta title and seo meta Keywords.Everyone should be written in the header file {if isset ($SEO [' title ']) &&!empty ($SEO [' title '])} {$SEO [' title ']}{/if}{$SEO [' Site_ Title '} This one.
This $seo variable is in the/phpcms/modules/content/index.php. so to find this $seo variable. V9 's code is very user-friendly. There are comments indicating the code that is a single page. I found the code block directly on the single page. Find here the $seo variable as follows:$SEO = SEO ($siteid, 0, $title, $setting [' meta_description '], $keywords);SEO This function is located in the file/phpcms/libs/functions/global.func.phpThe declaration of this function is:function seo ($siteid, $catid = ', $title = ', $description = ', $keyword = ')research on its definition, found that the second parameter is called column SEO meta title and seo meta keywords use, if it is 0 is not called. Modify the method. write the assignment of the above $seo$SEO = SEO ($siteid, $catid, $title, $setting [' meta_description '], $keywords);check on the Internet, but also to modify the/phpcms/modules/content/class/html.class.php inside the single page $seo variable (this should be generated static use.) )。 find comments indicating that those are single-page code as modified as:$SEO = SEO ($siteid, $catid, $title, $setting [' meta_description '], $keywords);
about the title there is a repetition, you can modify the SEO META title so look good point. There is a more bar behind the title. I will seo this function is located in the file/phpcms/libs/functions/global.func.php inside the$seo [' title '] = (isset ($title) &&! empty ($title)? $title: "). (Isset ($cat [' Setting '] [' meta_title ']) && empty ($cat [' Setting '] [' meta_title '])? $cat [' Setting '] [' Met A_title ']. '-': (Isset ($cat [' catname ']) && empty ($cat [' catname '])? $cat [' CatName ']. '-': ');modified to:$seo [' title '] = (isset ($title) &&! empty ($title)? $title. ‘_‘ : ‘‘) . (Isset ($cat [' Setting '] [' meta_title ']) && empty ($cat [' Setting '] [' meta_title '])? $cat [' Setting '] [' Met A_title ': (Isset ($cat [' catname ']) && empty ($cat [' catname '])? $cat [' CatName ']: ');
Phpcms single page SEO title resolution method