Jump to content

Comment appeler la category cover image sur le fichier tpl


Recommended Posts

J'ai trouvé une solution en système D : j'ai vu à quoi ressemble l'urld e l'image et c'est tout le temps ça : https://www.monsite.com/img/tmp/category_iddelacategorie.jpg. Du coup, j'ai fait https://www.hollandbikes.com/img/tmp/category_{$category->id}.jpg 

Et je l'ai appelé en background image de cette façon : <div style="background:url('https://www.monsite.com/img/tmp/category_{$category->id}.jpg'); margin-left:-10px;margin-right:-10px; min-height:250px; background-repeat:no-repeat; background-size:cover; width:100vw">

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...