公用页头

燃烧的冰2020-01-08  6.6K+

官网页面代码仅为演示,非实时更新,请以压缩包内模板代码为准。

 

公用页头,最顶部必须加载的代码部分,这部分代码无需修改。

<?php $conf = GLOBALS('conf');?>
<?php $header = GLOBALS('header');?>
<?php $user = GLOBALS('user');?>
<?php $uid = GLOBALS('uid');?>
<?php $gid = GLOBALS('gid');?>
<?php $fid = GLOBALS('fid');?>
<?php $tid = GLOBALS('tid');?>
<?php $pid = GLOBALS('pid');?>
<?php $route = GLOBALS('route');?>
<?php $forumlist_show = GLOBALS('forumlist_show');?>
<?php $forum_nav = GLOBALS('forum_nav');?>
<?php $static_version = $conf['static_version'];?>
<!--{hook header_start.htm}-->
<!DOCTYPE html>
<html lang="<?php echo $conf['lang'];?>">
<head>
	<?php echo defined('BASE_HREF') ? '<base href="'.BASE_HREF.'" />' : '' ;?>

	<!--{hook header_meta_before.htm}-->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<meta http-equiv="Cache-Control" content="no-transform" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
	<meta name="referrer" content="origin-when-cross-origin">
	<meta name="applicable-device" content="pc,mobile" />
	<meta name="MobileOptimized" content="width" />
	<meta name="HandheldFriendly" content="true" />
    <meta name="renderer" content="webkit" />
	<?php if(!empty($header['keywords'])) { ?>
	<meta name="keywords" content="<?php echo $header['keywords'];?>" />
	<?php } ?>

	<meta name="description" content="<?php echo $header['description'];?>" />
	<title>
		<?php echo $header['title'];?>
	</title>
	<!--{hook header_link_before.htm}-->
	<link rel="shortcut icon" href="<?php echo view_path();?>img/favicon.ico" />
	<link rel="icon" sizes="32x32" href="<?php echo view_path();?>img/favicon.ico">
	<link rel="Bookmark" href="<?php echo view_path();?>img/favicon.ico" />
	<!--{hook header_bootstrap_before.htm}-->
	<?php $bootstrap_css = empty($bootstrap_css) ? view_path()."css/bootstrap.min.css".$static_version : $bootstrap_css;?>
	<link rel="stylesheet" href="<?php echo $bootstrap_css;?>">
	<!--{hook header_bootstrap_after.htm}-->
	<link rel="stylesheet" href="<?php echo view_path();?>css/font-awesome.min.css<?php echo $static_version;?>">
	<link rel="stylesheet" href="<?php echo view_path();?>css/wellcms.css<?php echo $static_version;?>">
	<!--{hook header_link_after.htm}-->
</head>
 

加载自己的css文件

<link rel="stylesheet" href="<?php echo view_path();?>template/demo/css/***.css<?php echo $static_version;?>">

路径中的demo和***替换成自己的目录和文件名

 

具体可参照官方默认文件

导航文件 view/htm/header_nav.inc.htm

公用页头 view/htm/header.inc.htm

1