动态$ pageTitle标记变量 [英] Dynamic $pageTitle tag variables

查看:92
本文介绍了动态$ pageTitle标记变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是header.php:



< head>

< meta charset =utf-8>

< title>< / title>

< meta name =Descriptioncontent =/>

< !doctype html>

< html lang =>

< / head>





$ META_PAGENAME ='Home';

$ BODYCLASS ='主页';

$ pageTitle ='您好,欢迎来到我们的电子精品店 - example.com';

包括('inc / header.php');

?>







$ META_PAGENAME ='搜索';

$ BODYCLASS ='other-page';

$ pageTitle ='以下是[Product_list]列表;

包括( 'inc / header.php');

?>



我的问题在于product_list。我想要使​​用添加的product_list名称(根据搜索结果动态生成)来定制搜索页面标题。

因此,[product_list]的变量可能是:camera,手表,手机,..



知道怎么做吗?



谢谢

Here is the header.php:

<head>
<meta charset="utf-8">
<title></title>
<meta name="Description" content="" />
<!doctype html>
<html lang="">
</head>


$META_PAGENAME = ' Home';
$BODYCLASS = 'home-page';
$pageTitle = 'Hello, Welcome to our e-boutique - example.com';
include('inc/header.php');
?>



$META_PAGENAME = ' Search';
$BODYCLASS = 'other-page';
$pageTitle = 'Here is the list of "[Product_list]";
include('inc/header.php');
?>

My issue is with the product_list. I'd like to the search page title to be customized with the added name of product_list (which is dynamically generated based on search results).
So, the variables of [product_list] could be: cameras, watches, phones,..

Any idea how to do it?

Thanks

推荐答案

META_PAGENAME ='Home';
META_PAGENAME = ' Home';


BODYCLASS ='主页';
BODYCLASS = 'home-page';


pageTitle ='您好,欢迎来到我们的电子精品店 - example.com';

include('inc / header.php');

?>






pageTitle = 'Hello, Welcome to our e-boutique - example.com';
include('inc/header.php');
?>




这篇关于动态$ pageTitle标记变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆