SergMi Posted February 5, 2019 Share Posted February 5, 2019 Hello, I have problems with child theme, namely in main theme i connect two css file in template stylesheets.tpl, like this <link rel="stylesheet" href="{$urls.css_url}responsive.css" type="text/css" media="{$stylesheet.media}"> <link rel="stylesheet" href="{$urls.css_url}fontello/css/fontello.css" type="text/css" media="{$stylesheet.media}"> After, when i create child theme via https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/ Files responsive.css and fontello.css don't pull up from main theme, and try load from child theme. Why it happend, how to make so that these files are loaded from the main theme? Link to comment Share on other sites More sharing options...
JBW Posted February 6, 2019 Share Posted February 6, 2019 Try to delete these files from your child theme folder and see if they ger loaded automatically from parent theme Link to comment Share on other sites More sharing options...
SergMi Posted February 7, 2019 Author Share Posted February 7, 2019 Hello Thank you for your reply. No, this files not loaded automatically from parent theme. Link to comment Share on other sites More sharing options...
JBW Posted February 7, 2019 Share Posted February 7, 2019 {$urls.css_url } is pointing to actuals theme CSS directory, not the parent one. You can try to replace it by {$smarty.const._PS_PARENT_THEME_DIR_}assets/css or more simply put the exact path of your parent theme css dir there. Link to comment Share on other sites More sharing options...
SergMi Posted February 7, 2019 Author Share Posted February 7, 2019 Thank you for your reply . to do it, need create template in child theme, i do not want do it, in child theme just create theme.yml and preview.png and nothing more. If do what you wrote main theme not load this files. Need that to good work main theme and child. Link to comment Share on other sites More sharing options...
JBW Posted February 7, 2019 Share Posted February 7, 2019 Are you using main and child theme in parallel? Then only hardcoding the path in the file would work. But no need for file in child theme in this case I think (anyway whats wrong about files in child theme - thought thats the only purpose of having a child theme) Link to comment Share on other sites More sharing options...
SergMi Posted February 7, 2019 Author Share Posted February 7, 2019 Yes, okay. Thank you for your reply. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now