Welcome to Geeklog Monday, July 16 2018 @ 02:32 am EDT

Geeklog Forums

How to duplicate and modify Theme


Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
I duplicated Denim theme and renamed it, then edited css_ltr/custom.css file and functions.php.
But web site still reads custom.css file from denim theme.
It seems rel_links includes files with .css and .js extensions from denim theme.
I seached under the new theme folder and find denim words in .styl files, so I suspect their malfunctioning.
How can I solve it? I'm not familier with the .styl things, so please explain them.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1287
Did you update the function names in functions.php file?

It should reflect the name of the new theme.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
Quote by: Laugh

Did you update the function names in functions.php file?

It should reflect the name of the new theme.


Yes, I had changed them like as follows:
from theme_config_denim() to theme_config_mynewtheme()

EDIT:I checked the website today, and I make sure it reflects the name of the new theme.Thanks.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
I think the problem would be solved if I make css.file with unique name like style_custom_0001.css whenever editing and put it in header.thtml manually, that goes for a custom.js file, too.
Any advice?

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1287
So it is working then?

If the theme is not going to be too different from the orginal theme you should take a look at a child theme. An example of a child theme is denim_curve. It uses it's own custom css file and you only need to include the template files that have changed in it's own directory. The theme then will use the demin theme for any missing template files (or what ever theme you specify).

This makes things easier when upgrading.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
It is working now. And thanks for the new info.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
Now I have another issue.
On configuration page, I accidentally activated old theme which is not supported in the current GL, and lost way to change theme back to denim. /admin/configuration.php doesn’t show the config pane any more. I also looked into Database and found
theme s:9:"mobile_3g";
This is a bit cryptic so couldn't change value for denim.

How can I change theme back to denim?

I should have delete unsupported theme from layout/.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1287
Easiest way at the moment is too modify the database.

s:9:"mobile_3g";

The value has been serialized. s means string and 9 is the length.

So your new value should be

s:5:"denim";
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 46
Thanks.

All times are EDT. The time is now 02:32 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content