Getting a static html theme to work

Permalink 1 user found helpful
Hi Guys,

I'm new to concrete and have been having problems getting a simple html theme to work.

I've followed all the instructions with regards to changing the index.html to default.php, adding commands to show the correct paths for the stylesheet etc. As below

<link href="<?=$this->getThemePath()?>/styles.css" rel="stylesheet" type="text/css" />

( the css is located in the root of the directory and called styles.css)

However when i activate the theme in concrete5 all i get is a plain html layout without the images or the css applied to it.

Can someone please help?

 
jbx replied on at Permalink Reply
jbx
Sure, can you provide a URL to your site and I'll take a look for you...

Jon
richardacherki replied on at Permalink Reply
Hi John,

Im currently working on a localhost using xampp, so no link i'm afraid, have you any idea why it's not finding my css styles to apply to the html. here's what i've got in the default.php

<link rel="stylesheet" type="text/css" href="<?php= $this->getStylesheet('css/styles.css'); ?>" />
<title><?php Loader::element('header_required'); ?></title>

oddly enough it does show the dashboard bar so i can jump between the page and the dashboard.
jbx replied on at Permalink Reply
jbx
You seem to have <?php=... Should that be <?php echo ??

Also, if you're using Firefox, then make sure you have Firebug installed. Enable the Net panel and reload your page, that will show you any files it can't load (highlighted in red) the error code and where it's looking for the file.

Also, view the source of your page and ;look in the header for your CSS line and see what is being put in the href. If the problem isn't obvious, paste the full stylesheet link in here...

Jon
richardacherki replied on at Permalink Reply
Hi John,

If i place the echo command in the src links, it throws up a parsing error, also the code i have used has come directly from the tutorials. I checked the net options in firebug and it fires out these errors.

URL:
http://localhost/concrete5 %3C?php=$this-%3EgetStylesheet(%27css/styles.css%27);%20?%3E
STATUS:
403Forbidden

Looking at the page source it's throwing up these errors:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Access forbidden!</title>
<link rev="made" href="mailto:postmaster@localhost" />
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
body { color: #000000; background-color: #FFFFFF; }
a:link { color: #0000CC; }
p, address {margin-left: 3em;}
span {font-size: smaller;}
/*]]>*/--></style>
</head>

<body>
<h1>Access forbidden!</h1>
<p>




You don't have permission to access the requested object.
It is either read-protected or not readable by the server.



</p>
<p>
If you think this is a server error, please contact
the <a href="mailto:postmaster@localhost">webmaster</a>.

</p>

<h2>Error 403</h2>
<address>
<a href="/">localhost</a><br />

<span>27/09/2010 17:54:25<br />

Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1</span>
</address>
</body>
</html>


Seems like it can't access the files, but for the life of me i cant understand why?

Any help would be much appreciated.
jeramy replied on at Permalink Reply
jeramy
This is wrong:
<title><?php Loader::element('header_required'); ?></title>


The header_required will add the <title> so simply add this before your closing </head>

<?php Loader::element('header_required');  ?>
richardacherki replied on at Permalink Reply
Thanks I made that change to the header, however it still hasn't fixed the problem that the server cannot access my files? Anyone know what the problem is??
richardacherki replied on at Permalink Reply
Looks like some of the concrete 5 videos and documentation are out of date, after talking to someone i found that this code allowed me to link correctly to the style sheet

<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->getStyleSheet('css/styles.css')?>"/>

look like the code i have seen aroubnd was missing the echo command and also using an = which cause the problem, also for images this code worked

img src="<?php echo $this->getThemePath()?>/images/graphics/frontpage.gif"

Also remember to adjust directroy structure in your css file to remove ../dire/dir to /dire/dir so conrete5 can find the images
chapter5 replied on at Permalink Reply
thanks for this post!
chapter5 replied on at Permalink Reply
thanks for this post!