• Join Now
  • Sign In
  • Cart
  • Instant Setup
  • Download
Logo
  • About
    • Try it Out
    • For Developers
    • For Agencies
    • For Designers
    • For Anyone
    • Testimonials
    • Showcase
    • History
    • Our Philosophy
    • Credits
    • What does free mean?
    • Blog
  • Community
    • Members
    • Forums
    • Chat
    • Karma
    • International
    • Jobs
    • eNewsletters
  • Developers
    • Download concrete5
    • Join Beta Team
    • Translate concrete5
    • Bug Tracker
    • Submit to Marketplace
    • Code Submissions
    • News
    • Community Leaders
  • Marketplace
    • Add-Ons
    • Themes
    • Add-on Installation
    • Deal Of The Day
    • Swag
    • Theme Contest 2012
  • Services
    • Hosting
    • Support Options
    • Consulting
    • Training
    • Enterprise
  • Documentation
    • Getting Started
    • Editor's Guide
    • Developers Guide
    • How-Tos
  • How-Tos

"concrete-ize" a basic HTML theme in 8 minutes

Posted byfrz in Designers on Oct 31, 2008.
23 people like this.

Code Recap

The following are examples of the code that was used in the movie, to setup editable areas, and make a template editable.

Add an area named "Main Content 2" to a page

<?php
    $a = new Area('Main Content 2');
    $a->display($c);
?>

Make a template editable

Remove the title tag from a template, and replace it with this:

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

Additionally, for concrete5.5 and above, make sure you add the line

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

right before the closing body tag.

Common area and template names

Standard area and template names for themes

Just to clarify, for those whose php is a little rusty and couldn't see the coding example in the video too well, the syntax for getThemePath is:

  <?=$this->getThemePath()?>

And to insert it into a line that originally says:

  <link href="style.css" rel="stylesheet" type="text/css" />

Add it like this:

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

Step by Step review of ScreenCast
by BrotherPhil

1. Find an HTML-based theme you like, download it onto your computer.

2. Rename unzipped folder what you want the theme to be named in C5

3. Create a thumbnail of the website, to fit 120x90 (png format) image size. Place thumbnail image into your renamed theme directory

4. Create a theme description by opening your text editor, create a new file named description.txt. On the first line of this text file, type the name of the theme. On the second line give a brief description of the theme.

5. Rename the main html (index.html, for instance) default.php

6. Open the new default.php file in your text editor

7. Find every relative URL reference in the code and add this Get ThemePath code to tell C5 where to find all of the necessary image, css, and other necessary files. 

The old line:

<link href="style.css" rel="stylesheet" type="text/css" />

should now look like

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


8. Enable the C5 Menu bar by replacing the Title area of the header with the following code:

<?php
Loader::element('header_required'); ?>
9. Enable C5 Editing by assigning various areas to the C5 Theme. We do this by replacing current "dummy text" within the web design with C5 div headers. For instance, replace the main content area of the html code with this php code:

<?php
   $a = new Area('Main Content');
   $a->display($c);
?>

(to add this functionality, go to those other areas and replace it with similar code, replacing 'Main Content' with the names of the blocks you wish to place on the page in that location. See http://www.concrete5.org/documentation/developers/pages/themes-2/ for a list of areas and page types for themes.) 


10. Open the Concrete 5 website you have been editing.

11. Login. (you may have to add '/login/' to the end of the URL in order to login )

12. Open up the dashboard

13. Click on "Pages and Themes," you should see your new theme, ready to install.

14. Click on Install, and return to "Pages and Themes."

15. Click on activate, then confirm.

16. Click on "Return to Website" at tope of the C5 Menu (on the right hand side)

17. You should be able to click on "Edit Page" option in the C5 Menu bar to edit your website.

18. You may need to do a little more work to make navigation look and work properly, or other sections of the site. But, for the most part, you should have a working form of your new Concrete 5 Website Theme

Recent Discussions on this Topic

  • View More
  • Ask a Question

Simple guide to building your theme

Hey guys, I had found a lot of information about building themes on concrete5, but much of it I found was in a few different places, other parts I had to search a little for, so I thought I would provide a one stop place for everything I have learned abou…
Started by danielromney on 07/23/10 at 7:00 PM

22

replies

Inclusion of "footer_required" necessary for edit bar to appear in custom themes.

Just a quick note that may save someone headaches. If you are developing a new theme for concrete5.5 < you have to include footer_required in additional to header_required in order to have the edit bar appear.
Started by glockops on 12/16/11 at 1:28 PM

3

replies

Getting a static html theme to work

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 …
Started by richardacherki on 09/27/10 at 10:54 AM

9

replies

No C5 Edit Bar or Editable Areas Showing Up When I log In

I followed these instructions & had no luck so I looked at the structure of some of the themes I had downloaded through the marketplace and set up an elements folder which contains my header with the code below: [code]
Started by PassionForCreative on 04/20/11 at 10:28 AM

9

replies

Existing website into an editible concrete5 website

I'm new to concrete5 but i want to covert a website into a concrete 5 website. i followed this tutorial http://www.concrete5.org/documentation/how-tos/designers/make-a-theme/ (not even sure if its the right way) in the end when i did all the changes …
Started by Lorent on 10/03/11 at 2:02 PM

9

replies

How-To Tags

theme building, themes, templates, concreteize, website templates

Related How-Tos

None.

  • Documentation
  • How-Tos
  • Designers
  • "concrete-ize" a basic HTML theme in 8 minutes

Do you have questions

  • What are users saying?
  • Who is using concrete5?
  • What makes concrete5 easy?
  • Why develop on concrete5?
 

We’re on “The Twitter”

管理画面のJobsはどこにいったかか分かりますか ( #concrete5 live at http://t.co/W3tCUvlA)

Follow concrete5

About

  • Try it Out
  • For Developers
  • For Agencies
  • For Designers
  • For Anyone
  • Testimonials
  • Showcase
  • History
  • Our Philosophy
  • Credits
  • What does free mean?
  • Blog

Community

  • Members
  • Forums
  • Chat
  • International
  • Jobs
  • eNewsletters

Developers

  • Download concrete5
  • Join Beta Team
  • Translate concrete5
  • Bug Tracker
  • Beta
  • Submit to Marketplace
  • Code Submissions
  • News
  • Community Leaders
  • User Doc Group

Marketplace

  • Add-Ons
  • Themes
  • Add-on Installation
  • Deal Of The Day
  • Swag

Services

  • Hosting
  • Support Options
  • Consulting
  • Training
  • Enterprise

Documentation

  • Getting Started
  • Editor's Guide
  • Developers Guide
  • How-Tos

Legal

  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Contact Us
© 2008 to 2012 Concrete CMS Inc. All Rights Reserved.

Sign In?

You must have a user account and be signed to perform this action.

  • Sign In
  • Register