Welcome to Geeklog, Anonymous Thursday, October 10 2024 @ 11:32 pm EDT

Geeklog Forums

How to duplicate and modify Theme


Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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?
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
It is working now. And thanks for the new info.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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/.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
Thanks.
 Quote

All times are EDT. The time is now 11:32 pm.

  • 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