Posted on: 06/29/18 11:50pm
By: OMAL
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.
Re: How to duplicate and modify Theme
Posted on: 06/30/18 07:29am
By: Laugh
Did you update the function names in functions.php file?
It should reflect the name of the new theme.
Re: How to duplicate and modify Theme
Posted on: 06/30/18 05:52pm
By: OMAL
Quote by: LaughDid 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.
Re: How to duplicate and modify Theme
Posted on: 06/30/18 06:09pm
By: OMAL
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?
Re: How to duplicate and modify Theme
Posted on: 06/30/18 06:14pm
By: Laugh
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.
Re: How to duplicate and modify Theme
Posted on: 06/30/18 06:38pm
By: OMAL
It is working now. And thanks for the new info.
Re: How to duplicate and modify Theme
Posted on: 06/30/18 07:57pm
By: OMAL
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/.
Re: How to duplicate and modify Theme
Posted on: 07/01/18 06:52am
By: Laugh
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";
Re: How to duplicate and modify Theme
Posted on: 07/01/18 05:46pm
By: OMAL
Thanks.