Naming is inaccurate in this post

Permalink
According tohttp://www.concrete5.org/documentation/developers/pages/themes-2/...
the home page should get its own home.php, the blank default page should be default.php and so on. When you download a template from the internet like in the guide, they often only include a home page, so you *don't* want to name index.html to default.php.
I don't know if it's possible to edit that post. Correct me if I'm wrong, it's just a little confusing towards beginners, which I am.

And shouldn't css be referenced with
$this->getStyleSheet('your_stylesheet.css');
instead of how it says here?

timtorres
 
mkly replied on at Permalink Reply
mkly
Have you taken a look at this howto?
http://www.concrete5.org/documentation/how-tos/designers/making-a-t...

I really wouldn't look at that part of the documentation for working on or creating themes. That section is more for developers working on addons or customising sites at a lower level.

There are a few other howtos in the how to section as well that might be a little more helpful. The most helpful thing for me in the beginning was to grab the default theme installed with concrete5 and look at the files and that code.
timtorres replied on at Permalink Reply
timtorres
No I hadn't gone through the how-tos really other than the one where I posted this because it disagreed with other stuff I read, they're not organized in any way... But the one you linked is very detailed and helpful so far.
I got the theme sorta working but haven't defined any areas yet. When I preview it, none of the images that I define in my css show up, which is pretty much all of them. I have all of my css in a css/ folder and images in an images/ folder which is probably the case. I don't want to break this structure, so is there any way to fix this? I could use absolute urls, but I'm developing on a local server so I'd have to change them all when I upload to my host.
MysteriousCleon replied on at Permalink Reply
MysteriousCleon
In CSS images should work normally. I always use images in "pics" folder, and CSS i css folder, and there is no problem when I use them for instance like that:
background: url(../pics/contbgd.png);
timtorres replied on at Permalink Reply
timtorres
That is exactly what I am using. The c5 toolbar isn't showing up either, there is a space inserted for it though. At the very top of my page I have
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>

and am using the command as described for the header:
<?php Loader::element('header_required'); ?>

Let me know if there's anything else I should show you
Thanks

Edit: Using the Chrome developer tools, I went to an area where I knew an image was supposed to be and took a look at the rendered css. It showedhttp://localhost/themes/hiphopeagle/../images/header-bg.png...
which means that the method to insert my css
<?php print $this->getStyleSheet('main.css'); ?>
is probably the problem.
I took out all of the .. from ../images/image.png and everything looks good except for the toolbar which still is awol...
xaritas replied on at Permalink Best Answer Reply
The edit bar is actually defined in the footer, not in the header. So you are probably missing this:

<?php Loader::element('footer_required'); ?>


It's common for themes to have their own footer, pulled in like so:
<?php $this->inc('elements/footer.php'); ?> // or header.php or spaghetti.php or whatever


... and then THAT file pulls in the footer_required. The difference is that Loader::element actually looks first in SITE_ROOT/elements, then SITE_ROOT/concrete/elements to find the required .php file, while $this->inc just looks in a directory relative to the page that is currently being rendered. Also note that the Loader adds the .php for you, while $this->inc does not.

In regard to the original issue you posted about, I believe that home.php mentioned as an example. It's not, to my knowledge, required or expected in any way. You do have to set the "root" page (that is, the page you see when you go to 'http://www.example.com/') to be SOME type, if you want it to being rendered with something other than default.php.

(Edit: Rebalanced parentheses))
timtorres replied on at Permalink Reply
timtorres
Haha that was what I needed. My thinking was that home.php was the same type as like a right_sidebar. When I installed the theme, it wasn't recognized as one of the presets so I made it a page type. I think I'll delete that and make it a single page. I'll use includes too, some of my pages have different styles and scripts being called so I wanted to wait until I had a basic page running before I started the more complicated things.
Thanks a lot for your help

PS C5 is awesome!
mkly replied on at Permalink Reply
mkly
Again, I would really recommend looking at the included themes and other free themes in the marketplace. Concrete5 is does have a company behind it, but it is still open source and the same path to getting up to speed, which is reading the source code of what others have already done. There isn't any "official" developer handbook. This isn't like .NET or something.

I think you are looking for a more structured corporate style development model. Concrete5 really isn't that. Many people have many different ways of getting the same thing done. Your best bet is to try a couple of them and see which methods you find suit you best.

Taking an already working theme and copying modifying it is really the first step in learning theming.

Best,
Mike
timtorres replied on at Permalink Reply
timtorres
I did a lot of research before picking this, mainly because I could make my own theme. I am pretty good at working things out, I just some help to get started haha. Thanks for your help