Jump to content

Archived

This topic is now archived and is closed to further replies.

PeriniNero

Proper usage of Child Theme and config json file

Recommended Posts

PeriniNero+    8
PeriniNero

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
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

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? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
PeriniNero+    8
PeriniNero

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
PeriniNero+    8
PeriniNero

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
greenfly    230
greenfly

Looking into this for you. Will up date you shortly 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
PeriniNero+    8
PeriniNero

Thanks Martin Davies

Share this post


Link to post
Share on other sites
PeriniNero+    8
PeriniNero

any news Martin Davies?

Share this post


Link to post
Share on other sites

  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a multisite installation and had some questions regarding the themeing options. All the sites will have the same structure but each individual site would need a different h1 font and link color. I had originally thought that I would program/edit the parent theme to have a certain set of templates, font sizes, etc. and then that would feed to all the individual sites where I could activate the child theme and use the child theme to define the individual sites' specific link color, heading fonts, etc. So, what I was shooting for was:
      Parent theme = shared by all sites
      Child theme = specific to the minor customizations on a per site basis.
      Is this possible? Am I misunderstanding how these would actually deploy to the different sites?
    • jagipson
      By jagipson+
      Should be a simple answer but not sure why its not doing this.  I have a child theme installed on pagelines 5 that has a hook so it will write over the theme css. Strange is that when I am on the frontend the code works but in the dashboard your theme takes over my code and its no where to be found. See examples attachments
      @Andrew @Danny


    • TallTree
      By TallTree+
      Hi,
      I am trying to remove the sidebar areas from my child theme (pagelines.com) from the post pages on a site:
      https://staging4.talltreemusicfestival.com/2017/grand-analog/
      The content is all the way to the left and very small, and the two sidebar areas are taking up a lot of space.
      What I'm after is content to the left, taking up most of the space, and then a small sidebar width on the right for widgets.
      I've tried selecting 'read width content' and 'full width content' in the edit screen for the WP content section, but it doesn't change.  If I try to move the sidebars (1 or 2) to the left, it doesn't change.
      If I select the pagelines framework theme (not child), the two sidebars go away when not selecting them in the edit screen..
      Can someone please tell me what I'm doing wrong?
      Thanks in advance.
      -Matt
       
    • dbrowne02
      By dbrowne02+
      Hi, I noticed that framework and pagelines.com child theme has a number of errors when run through themecheck. The others, like material and bootstrap, don't have any errors when run through theme check. Is there a way to get it so that there are no errors on the child theme?

    • reklov79
      By reklov79+
      Hi,
      Meganav seems to have a bug if you upload a Logo with a higher resolution (which actually is useful as it looks then sharper on mobile phones). But on mobile the Logo is then larger than on a desktop. Problem is the following code in the meganav style.css. Simply the "height: auto !important" needs to be removed.
      @media (max-width: 480px) { style.css?ver=5.0.14:133 body .meganav-logo img{ height: auto !important; } } But how to achieve that? What is the standard method for customizing that? Overriding via CSS / LESS doesn't work - in this case especially because of the !important derictive used in the original CSS I believe.
      Changing the original CSS is something I don't want to do as it leads into issues when upgrading.
      Btw: I seem not to be the only one with that issue - anyhow, the solution here (not displaying the Logo on mobile) is not acceptable for me.
      Thanks,
      Volker
       
×