Jump to content

theme.yml add css files [Solved]


Recommended Posts

hello I'm fairly new to Prestashop, and iv started to develop so i can start selling my products online.

As a side note I'm also i school leaning to be a developer, but still have away to go :)

 

but anyways

 

i'm made a child theme and suing the classic theme as a parent.

 

i'v manege not register my own styles by editing the theme.yml file and adding / ucommentet this

 

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
 css:
    all:
      - id: theme-custom
        path: assets/css/custom.css
        media: all
        priority: 1000

 

but i would like to add more styles sheets, but i dosen't load when i look at source view, in crome

 

this it what i came up with:

 

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
 css:
    all:
      - id: theme-custom
        path: assets/css/custom.css
        media: all
        priority: 1000


      - id: font-awesome-style
        path: assets/css/font-awesome.min.css
        inline: true
        media: all
        priority: 999

 

what i'm i doing wrong ?

 

regards Ativeisis

Edited by Ativeisis (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...
  • 5 months later...
On 11/30/2019 at 6:48 AM, Ronaldo Perez said:

Since this topic appears in Google, I hope it helps someone: you need to re-install the theme in case you changed theme.yml after adding the assets.

I haven't tried this but found a simpler way here: https://stackoverflow.com/questions/42924822/prestashop-1-7-starter-theme-assets-in-theme-yml-is-not-working

Quote

 

If you want reload your configuration :

Modify your theme.yml

Delete the file into ROOT_FOLDER/config/themes/your theme/shop*.json

Refresh your page, prestashop going to regenerate the config json file for your theme

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 years later...
On 6/5/2020 at 6:41 PM, Ronaldo Perez said:

Yep, this is better way, since that json re-generates dynamically.

Hello we have not this file in my directory "ROOT_FOLDER/config/themes/my-theme/shop*.json". Maybe because I didn't activate the back office caches?

Link to comment
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
×
×
  • Create New...