• 0

Proper usage of Child Theme and config json file


Question

Posted · Report post

We built some sites with a Child Theme. As from the launch of DMS there was some confusion about what files exactly to use for the Child Theme, we used the former base child theme for pagelines and added the less file and less folder. Ofcourse we did change the template name to "dms". So far so good. In the docs http://docs.pagelines.com/customize/base-child-theme there's no json config file visible in the child theme folder. When we do not add a config file to the child theme folder, DMS admin / Global Options / Import-Export does NOT show the orange button "load child theme config", as mentioned in Nicks blog http://betterdms.com/2013/09/11/dms-config-file-explained/ . His conclusion is maybe right, that we don't use a child theme (properly)... However, the DMS admin shows the child activated; no error messages. We've added some screenshots below:

 

http://cdn.cortesia.nl/dms/dms_child_files.PNG

http://cdn.cortesia.nl/dms/dms_child_style.PNG

http://cdn.cortesia.nl/dms/dms_themes_activated.PNG

 

When we export all settings and download the config json file, strip the date and add this file to the child theme folder, after refresh the orange button "load child theme config" shows in Global Options / Import-Export. By the way, the "publish" function: to add the config json file to the child theme seems not to work at all.

 

So, should there be an empty (?) base config json file in the Child Theme folder when starting development?

Or should people create one right after install and copy this one to the Child Theme folder?

Are changes to the Child after creating the config json file saved in the config file placed in the Child Theme folder?

 

So ofcourse it's possible it's our lack of technical knowledge that causes this issue. The question is, do we use the proper settings and files for a correct custom Child Theme? In any case, the config json file is not mentioned in the docs http://docs.pagelines.com/customize/base-child-theme.

 

By the way, another tip for the official DMS docs: we would suggest to mention that the Wordpress Codex is not fully correct regarding to DMS (and former PageLines) Childs: people should not add the import css line in the childs css file.

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

First, let me thank you for your suggestion for our docs.

 

I believe the docs page you refer to is saying what you can include in a child them, not necessarily what you must include.  There should be no need to set up any pl-conflg.json files as the Import/Export function should build it.  The only thing that might prohibit that would be a problem with permissions or ownership of files. As you have a developer's license, it should work to create the file. 

 

I've inspected Nick's Base Theme, which doesn't include any config.json file at all, and is used by quite a number of our subscribers. I will discuss the child theming page with our docs team, to see what we can do to test it and update those docs quickly.

 

To answer your question, if you're trying to export the child theme, with all the site's settings, for use in other websites, then the config.json file can be helpful.  However, if you desire to just copy the theme, it's really not needed.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello Perinero 

 

By the way, the "publish" function: to add the config json file to the child theme seems not to work at all.

 

I have just tested this and publishing the json file worked, It downloads a json file to your machine that you can then use in the Child theme to make your own theme as a backup or for use on other sites. Does the file not download at all? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Rob thanks for your input.

 

Regarding to the Base Theme, I was under the impression (at least in the former PageLines Framework years) that the Base Theme would contain the files you at least must have to create a Child of your own. Sort of minimum requirements. Anyway, this would be excellent in our opinion. Feels like child theming for DMS is a bit underexposed till now.

 

So, the json config file is not required at all. In that case Nick's advice regarding to backup of settings is the most interesting feature of the json file in general for me.

 

Remains the question why DMS (developer version) will not create a config file which should be placed automatically in the Child Theme (the last option in Global Settings / Import-Export)... As the orange button on the right does not appear in the installs we have using Child Themes, it seems DMS does not recognize the Child (in full). This is a bit strange to us.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Martin Davies thanks for your input as well.

 

The export file can indeed be downloaded, no problem at all (except maybe for the date in the filename, which suggests it's indeed for backup reasons only, but then we would suggest to add the sitename as well in de filename).

 

But we didn't mean this feature, but the last feature at the bottom of the Global Settings / Import-Export page; which states that de config json file will automatically be added to the Child Theme folder.

 

http://cdn.cortesia.nl/dms/dms-export-to-child.PNG

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Looking into this for you. Will up date you shortly 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks Martin Davies

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

any news Martin Davies?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now