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

Share this post


Link to post
Share on other sites

Bonjour,

Si je regarde le template apr défaut, je trouve le code d'appel pour l'url de l'image qui est :

{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}

 

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More