<?php
$html_head = array(
/* 'product_list_title' => array(
'#type' => 'html_tag',
'#tag' => 'title',
'#value' =>"馥绿德雅产品[field_product_pl_1]_产品系列 | 馥绿德雅洗护中国官网"
),*/
'product_list_keywords' => array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array('name'=>'keywords','content'=>"[field_product_pl_1],馥绿德雅[field_product_pl_1]")
),
'product_list_description' => array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array('name'=>'description','content'=>"馥绿德雅产品[field_product_pl_1]+帮助用户改善秀发的发质,通过使用产品[field_product_pl_1]让您的秀发宛若新生。")
)
);
foreach ($html_head as $key => $value) {
drupal_add_html_head($value,$key);
}
//drupal_alter('head_title',"馥绿德雅产品[field_product_pl_1]_产品系列 | 馥绿德雅洗护中国官网");
?>
//title
function themename_preprocess_html(&$variables, $hook) {
$tid = arg(2);
if (arg(0) == 'product' && arg(1) == 'product-list' && arg(3) == 'all' && $term = taxonomy_term_load($tid)) {
$name = $term->name;
$variables['head_title'] = '馥绿德雅' . $name . '+帮助用户改善秀发的发质,通过使用' . $name .'称让您的秀发宛若新生。';
}
}