I'm confused, does the default.php control the overall layout?
Permalink 2 users found helpful
I'm a bit confused, I made the default look ok with two columns ect then added new pages so that they appear in my nav bar. But when I select one of the new pages only part of the header appears and the nav bar has moved!
How do I control the layout? I'm using css to control the default.php but what about the other pages?
cheers
How do I control the layout? I'm using css to control the default.php but what about the other pages?
cheers
Thanks again Okhayat, The problem I've got is that I've designed a default.php page and it works fine on my home page because it is my home page, but I've made five other pages using the 'add page' function in the tool bar. When I select these pages the image under the header file is gone, also I'm used to being able to view and edit each pages source code but I only seem to have the default page. I'm not sure what full is or why I would have a leftside bar page when the layout is controlled by the dashboard.
I apologise for the long message, I just can't seem to get a real handle on the layout and design. I know how to convert a theme to C5 (by watching the video) but how about a video for designing from scratch.
thanks
I apologise for the long message, I just can't seem to get a real handle on the layout and design. I know how to convert a theme to C5 (by watching the video) but how about a video for designing from scratch.
thanks
Simply selecting the layout from C5 doesn't do anything magical to your design. You have to create the required layout (full, left_sidebar, or right_sidebar) with a respective .php file so you can use it.
For example, here is a left sidebar: left_sidebar.php:
and right_sidebar.php:
For example, here is a left sidebar: left_sidebar.php:
<div id="container" style="width:950px;margin:0 auto"> <div id="sidebar" style="float:left;width:250px"></div> <div id="main" style="float:left;margin-left:10px;width:690px"></div> </div>
and right_sidebar.php:
<div id="container" style="width:950px;margin:0 auto"> <div id="sidebar" style="float:right;width:250px"></div> <div id="main" style="float:right;margin-left:10px;width:690px"></div> </div>
Sorry still don't get it. default.php controls the overall layout of the site in conjunction with css. So I can create a main content area and a left sidebar within the default.php.
I still don't get the leftsidebar.php. To me you code looks as it would in default.php
Most of the themes I've looked seem to posses a default.php, view.php and maybe a full.php.
I wish there were some clear documentation
I still don't get the leftsidebar.php. To me you code looks as it would in default.php
Most of the themes I've looked seem to posses a default.php, view.php and maybe a full.php.
I wish there were some clear documentation
you can think of default.php as a backup so if you don't have a left-sidebar.php for some random reason or you accidentally rename your page-type to something different your backup will take effect. This is so you are always getting a page generated no matter what.
Kappi
I feel your pain. It is a little confusing at first when you start to design themes.
Okhayat is correct in what he wrote. I had some issues with positioning and layout at first so I know from personal experience.
Your default.php is the page that if Concrete5 can't find a certain layout, it goes to that. So don't make it customized. Your customized default.php you have made, I think you should rename it to something along the lines of my_theme_page.php and keep your default.php nice and clean. As you saw in the video's, it is very easy BUT you must keep the naming conventions as Concrete5 has said so the Concrete5 defaults work correctly and your css file doesn't conflict with anything.
Once you have done this, you should be able to see everything you have customized. Just remember that header items go in the header file and your main site page shouldn't have any header stuff (images and the sort).
Hope this helps.
I feel your pain. It is a little confusing at first when you start to design themes.
Okhayat is correct in what he wrote. I had some issues with positioning and layout at first so I know from personal experience.
Your default.php is the page that if Concrete5 can't find a certain layout, it goes to that. So don't make it customized. Your customized default.php you have made, I think you should rename it to something along the lines of my_theme_page.php and keep your default.php nice and clean. As you saw in the video's, it is very easy BUT you must keep the naming conventions as Concrete5 has said so the Concrete5 defaults work correctly and your css file doesn't conflict with anything.
Once you have done this, you should be able to see everything you have customized. Just remember that header items go in the header file and your main site page shouldn't have any header stuff (images and the sort).
Hope this helps.
Thanks guys so very much, I feel a little light is beginning to appear at the end of the tunnel.
Sorry my friend, but you really need to know some HTML and a little of CSS if you want to create your own theme.
That is of course in addition to PHP.
That is of course in addition to PHP.
Hi again, I am well versed in css and html and possess a honours degree in internet software development however I have never used a content management system, I usually code by hand using straight xhtml and css in conjunction with php. I haven't as yet come across a cms thats entirely user intuitive, C% comes very close indeed but still leaves the new user in the dark as far as development in concerned.
See if this doc help at all. Basic but may help.
Bill Doc is nice! Take a look at that and the other C5 docs.
http://www.concrete5.org/documentation/developers/pages/themes...
If you know XHTML and CSS you will be fine.
http://www.concrete5.org/documentation/developers/pages/themes...
If you know XHTML and CSS you will be fine.
Kappi,
I would say that if I were trying to explain it -
The default page is simply that - a default.
You ideally don't want to use the CMS for layout. You would create .php + .css files for that. so in essence, you create a homepage, left/right sidebar page, full template...
I find I make these in non cms environments...
I would also look at the CMS for content only and not layout... as it is a Content Management System.
Hope that helps to clarify!
-Phil
I would say that if I were trying to explain it -
The default page is simply that - a default.
You ideally don't want to use the CMS for layout. You would create .php + .css files for that. so in essence, you create a homepage, left/right sidebar page, full template...
I find I make these in non cms environments...
I would also look at the CMS for content only and not layout... as it is a Content Management System.
Hope that helps to clarify!
-Phil
For example, if your theme only has full.php and default.php but not left_sidebar.php or right_sidebar.php and you choose any of those two, default.php will be used.
So, you can either use html tags to define your layout (div, table, ..etc) or css.