• Join Now
  • Sign In
  • Cart
  • Instant Setup
  • Download
Logo
  • About
    • Try it Out
    • Site Editor Tour
    • Designer Tour
    • Developer Tour
    • 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
    • Installation Help
    • Deal Of The Day
    • Swag
  • Services
    • Hosting
    • Support Options
    • Consulting
    • Training
    • Enterprise
  • Documentation
    • Getting Started
    • Editor's Guide
    • Developers Guide
    • How-Tos
    • Basics
  • How-Tos

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

Posted byfrz in Designers on Oct 31, 2008.
17 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'); 
 ?>

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

5.4.0

Is this still correct, and what is up with the PHP short tags? I thought that died with PHP3, John
Started by jasteele123 on 04/02/10 at 3:51 AM

5

replies

content blocks won't work

Hi, I followed your tutorial about how to convert a HTML file into a Concrete5 Template.But my content blocks do not work. I am using the code you suggested, e.g. But the areas do not display. What am I doing wrong please?
Started by uce2009 on 01/05/11 at 10:24 AM

1

reply

Theme not showing up in "pages and themes"

I downloaded a little HTML theme, made the changes to the default.php page as instructed, added a thumbnail and description.txt, uploaded it to the themes folder of my site, but don't see it when I look in the dashboard. What could it be?
Started by dibbc on 02/09/11 at 2:28 PM

7

replies

Can dynamic Pages can be integrated to C5?

Can dynamic pages where content are coming from the database can be integrated to the Concrete5? If yes what are the solution for it?
Started by johnyjohny7 on 08/04/11 at 2:25 AM

1

reply

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

7

replies

How-To Tags

theme building, concreteize

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”

Totally Random Live 2/3/2012 http://t.co/E99XM8wb #concrete5

Follow concrete5

About

  • Try it Out
  • Site Editor Tour
  • Designer Tour
  • Developer Tour
  • 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
  • Installation Help
  • Deal Of The Day
  • Swag

Services

  • Hosting
  • Support Options
  • Consulting
  • Training
  • Enterprise

Documentation

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

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