Use attributes to set background images, stuck on Step 3
Permalink
I'm trying to follow the instructions for using attributes to set background images, published at the following link.
http://www.concrete5.org/documentation/how-tos/designers/use-attrib...
I'm stuck at Step 3. I'm new to building a website and don't know where to find and insert the code. Where do I find the code and where is the "closing head tag" the article speaks of?
Thank you.
http://www.concrete5.org/documentation/how-tos/designers/use-attrib...
I'm stuck at Step 3. I'm new to building a website and don't know where to find and insert the code. Where do I find the code and where is the "closing head tag" the article speaks of?
Thank you.
If you dont see a <head> tag anywhere, you can simply add it right after the <html> tag. So like this:
Thanks for the quick reply. Where do I find the <html> tag in Concrete5?
Oh, if you are looking for the header.php file. It should be located in your themes folder. This could be in the packages folder as well. Just depends how you set it up. It's worthwhile to take a look and figure out the file structure if you want to get into customizing Concrete5.
I'm using the insta-setup on Concrete5 servers, rather than the downloaded version of Concrete5. I don't see where I can access the code in the insta-setup application.
You will need to go into the server's Concrete5 file directory and locate the file. Usually by means of FTP.
Here's what my code reads. Is this correct? Thank you.
<head>
<?php Loader::element('header_required'); ?>
<!-- Site Header Content //-->
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/reset.css" />
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/text.css" />
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/960_24_col.css" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<link href='//fonts.googleapis.com/css?family=Merriweather:400,700,900,300' rel='stylesheet' type='text/css' />
<?php
$backgroundImage = $c->getAttribute('background_image');
if ($backgroundImage) {
$backgroundImageURL = $backgroundImage->getURL();
echo '<style type="text/css">body {background-image:url(' . $backgroundImageURL . ');background-position: center;}</style>';
}
?>
</head>
<head>
<?php Loader::element('header_required'); ?>
<!-- Site Header Content //-->
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/reset.css" />
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/text.css" />
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/960_24_col.css" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<link href='//fonts.googleapis.com/css?family=Merriweather:400,700,900,300' rel='stylesheet' type='text/css' />
<?php
$backgroundImage = $c->getAttribute('background_image');
if ($backgroundImage) {
$backgroundImageURL = $backgroundImage->getURL();
echo '<style type="text/css">body {background-image:url(' . $backgroundImageURL . ');background-position: center;}</style>';
}
?>
</head>
Yes, I believe that is correct.
yes,to confirm above, you will find it in...Themes(your theme name/Elements and in ther will be two files, header.php and Footer.php Open up Header.php and ther you will see the code
Regards
Steve
Regards
Steve