I'm not entirely sure, how to word this correctly as I'm completely new to php, but I have the following questions regarding php.
I'm working on a site, where I created php parts that are pulled in with include/doc-header.part, for instance. This would be the doc-header.part:
The two questions I have regarding the header are:
a) How can I make the title of each page dynamic, so it shows the title of the respective page, like solaris empire | releases and so on?
b) I have a subfolder with some php pages. Before they were html pages and it was no problem linking the css file to the pages in the subfolder.
How would I need to change the doc-header.part to fetch the css file?
Also on those pages I have two JQuery scripts that only load on those pages.
I wanted to avoid to have those scripts load on every page of the site, so I didn't include it in the doc-footer.part, which looks like this.
My question regarding the footer is, how can I conditionally load those scripts only on those pages that require it?
Thanks in advance and apologies for not expressing myself clearly enough.
I'm working on a site, where I created php parts that are pulled in with include/doc-header.part, for instance. This would be the doc-header.part:
Code:
<!DOCTYPE html>
<html lang="de">
<!--[if lt IE 7]> <html class="ie6"> <![endif]-->
<!--[if IE 7]> <html class="ie7"> <![endif]-->
<!--[if IE 8]> <html class="ie8"> <![endif]-->
<!--[if gt IE 8]><!--><!--<![endif]-->
<head>
<meta charset="UTF-8">
<link href="favicon.ico" rel="shortcut icon">
<link href="css/style.css" media="all" rel="stylesheet">
<link href=
'http://fonts.googleapis.com/css?family=Titillium+Web:400,200|Roboto+Condensed:400,700'
rel='stylesheet' type='text/css'>
<title><?php if(isset($title)) { print $title; } else { print "solaris empire"; } ?></title>
<meta http-equiv="keywords" content="<?php if(isset($keywords)) { print $keywords; } else { print "default,key,words"; } ?>" />
<meta http-equiv="description" content="<?php if(isset($description)) { print $description; } else { print "Default Description!"; } ?>" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body>
The two questions I have regarding the header are:
a) How can I make the title of each page dynamic, so it shows the title of the respective page, like solaris empire | releases and so on?
b) I have a subfolder with some php pages. Before they were html pages and it was no problem linking the css file to the pages in the subfolder.
Code:
<link href="../css/style.css" media="all" rel="stylesheet">
Also on those pages I have two JQuery scripts that only load on those pages.
I wanted to avoid to have those scripts load on every page of the site, so I didn't include it in the doc-footer.part, which looks like this.
My question regarding the footer is, how can I conditionally load those scripts only on those pages that require it?
Code:
<footer class="footer">
<ul>
<li>
<a href="index.php">home</a>
</li>
<li>
<a href="artists.php">artists</a>
</li>
<li>
<a href="releases.php">releases</a>
</li>
<li>
<a href="about.php">about us</a>
</li>
<li>
<a href="promotion.php">promotion</a>
</li>
<li>
<a href="links.php">links</a>
</li>
<li>
<a href="projects.php">more projects</a>
</li>
<li>
<a href="contact.php">contact</a>
</li>
</ul>
</footer>
</div>
</body>
</html>