Jump to content

Background image via css


Recommended Posts

Hi,

I have made an custom template and trying to do the following:

 

Using css to display the uploaded category image and IN that image display category name and description

 

My code is as follows, but isnt working:

<div class="kategori-header" style="background-image:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'});">
		    <h2>{$category->name|escape:'htmlall':'UTF-8'}</h2>
	   <p> {if $category->description}

 {$category->description}{/if}</p></div>

I also need to set the image class somewhere up in the code, but not sure where to.

 

Any dieas?

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