Proper process of theming Concrete5 5.7

Permalink 2 users found helpful
Just installed 5.7 to get acquainted with this new environment.
Moved a copy of Elemental theme to application/themes.
Renamed the theme in description.txt and went on to install the theme.

Errors after activation of the new theme even though it is exact copy of "Elemental".
Some paths should change.

I than changed CSS path @ page_theme.php to point to application/themes [which is oddly camel cased even though it was said to be lowercased] and even got core css copied to applications/css just to stay on the safe side while testing.

Got the site running with this new theme, but as soon as I tried to customise the theme from the front end and few lines in main.less I get tons of errors related to less compiler.

So what's the proper process of theming Concrete5 5.7.

Sollo
View Replies: View Best Answer
Steevb replied on at Permalink Reply 1 Attachment
Steevb
Have you seen this page and watched the videos?

http://www.concrete5.org/about/blog/concrete5-sightings/5-7-develop...

I have now got my head around the basics. Three of my custom themes run perfectly, apart from customisation.

If you want to try installing and playing with good old GY, I've attached to download. just put it in the application/themes folder.
Sollo replied on at Permalink Reply
Sollo
Thanks!
To be honest I wasn't so lucky to find this link even though I did search concrete5.org & search engines. This should become more prominent. Thank you for the attached theme. It will be useful for many I'm sure.
Sollo replied on at Permalink Reply
Sollo
Re: GY Theme attached:
You probably started with an empty site.
It throws tons of errors.
I'll check these theming instructions now.
Steevb replied on at Permalink Reply
Steevb
Yes, sorry, you are always best starting with a blank site.
andrew replied on at Permalink Reply
andrew
Thanks Steev. Yeah, we just got those out yesterday. We'll be adding to them. These don't touch on theme configuration but I hope to get to that next week.
Sollo replied on at Permalink Best Answer Reply
Sollo
To answer my own question [at least regarding Elemental core theme]:

1. Place a copy of Elemental Theme in application/themes/

2. Changing title in application/themes/yourtheme/description.txt is... well recommended - to be able to tell the difference between two theme copies.

3. Edit namespace: 2nd line in application/themes/yourtheme/page_theme.php:
From: Concrete\Theme\Elemental
To: Application\Theme\Yourtheme [camel cased]

4. Edit relative path in application/themes/yourtheme/css/main.less 6th line to load required core css:

From:
@import "../../../css/build/core/include/mixins.less";

To:
@import "../../../../concrete/css/build/core/include/mixins.less";

And there you go, Elemental theme is now functional from application/themes folder and ready for customisation.
litteraria replied on at Permalink Reply
litteraria
Thanks a ton, Sollo! Just did an install of C5 for a new client, and right off I realized that the process of forking themes is completely different.

A gold star in return for your wisdom, sir. :D
hugostiglitz replied on at Permalink Reply
hugostiglitz
I followed these steps but my C5 UI disappeared. Also, my 'layouts' reset to one column when they used to be 3-columns wide.

I tried clearing cache, but that didn't help?

Any thoughts?
hugostiglitz replied on at Permalink Reply
hugostiglitz
Found the problem. I had capital letters in the name of my theme. When I changed the theme name to all lower case letters (with no spaces), it fixed the problem and the edit bar returned.
dsw528 replied on at Permalink Reply
Thank you so much. This helped immensely. Very clear instructions on where to go and what to do.

Much appreciated!
Steevb replied on at Permalink Reply
Steevb
Sorry, Away until the 10th September 2015
iLP replied on at Permalink Reply
iLP
I've got the same problem with Elemental, which I'd like to use as a starting point, whereas I have successfully converted/developed other themes per the screencasts on theming. What's the secret to making a proper child theme of Elemental?
pvernaglia replied on at Permalink Reply
pvernaglia
The namespace stuff at the top of Elementals page_theme.php (concrete/themes) are different than what you use in applications/themes. If you take a close look at Andy's video you will see the difference, once I changed those I stopped getting the errors from page_theme.php
iLP replied on at Permalink Reply
iLP
interestingly, 5.7.01 default install produces:

application\themes\

while the video and corresponding documentation indicates both camel and singular theme directory under application:

<?php
namespace Application\Theme\Urbanic;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme
{
}


Also, I have no Core directory under Concrete in 5.7.01.

What am I missing here?
Shotster replied on at Permalink Reply
Shotster
> interestingly, 5.7.01 default install produces:
>
> Also, I have no Core directory under Concrete in 5.7.01.
>
> What am I missing here?

I think you're missing the fact that namespaces are not directory paths. By convention, there is often a close correlation between the two, but they are not one and the same.

http://php.net/manual/en/language.namespaces.rationale.php...

BTW, the "Core" namespace maps to the directory "/concrete/src".

-Steve
iLP replied on at Permalink Reply
iLP
Aha. Thank you. I think I get it. I am not proficient in PHP, so this really helps. I'm conceptualizing it as an an alias for a snipped of code.
iLP replied on at Permalink Reply
iLP
Sollo - Sorry. I'm totally confused by the new architecture.

can you be more specific about step 5? i'm guessing it's for the build portion where it compiles the .less files, but I don't know which existing lines need to be changed in main.less, or in what directory the .less parse exists.
Sollo replied on at Permalink Reply
Sollo
I'm not competent enough, so you better wait for the core team documentation. Andrew said [see above] that some of it will be available next week.

As for step No.5, .less compiler should be in concrete/vendor directory. Turn "Show errors in page" on [System & Settings>Environment>Debug Settings] and see what errors you get. It will show you the exact path.

Dirty solution would be to just copy these folders from Concrete to Application folder.
iLP replied on at Permalink Reply
iLP
No, worries. You got it to work, so you're more competent than I with this new architecture. Grateful for your help.

What line(s) in main.less did you change so they point to the concrete/vendors directory?
iLP replied on at Permalink Reply
iLP
Oddly, I did not perform step 5, and I have full functionality so far. No exceptions on clean install with sample content. /shrug
Sollo replied on at Permalink Reply
Sollo
Sorry for delay, Step 5 is actually not necessary...I was messing around with various tests and it was late at night, I will correct the post above.