Jump to content

Kategorie s obrázkem na hlavní stránce


yuriix

Recommended Posts

To jsem udělal, ale nevím jak napsat tpl. aby vypadlo jako např. tohle = http://www.prestashop.com/forums/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id=25313

 

tpl. mám takové:

<!-- MODULE Home categories -->
<div>
<h4>{l s='categories' mod='homecategories'}</h4>
{if isset($categories) AND $categories}
 <div>
  <ul>
  {foreach from=$categories item=category name=homeCategories}
   {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)}
   <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}">
 <h5><a href="{$categoryLink}" title="{$categoryName}">{$category.name|truncate:35}</a></h5>

 <a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}-category.jpg" alt="{$category->name}" title="{$category->name}" id="categoryImage" /></a>

   </li>
  {/foreach}
  </ul>
 </div>
{else}
 <p>{l s='No categories' mod='homecategories'}</p>
{/if}
</div>
<!-- /MODULE Home categories -->

 

Potřebuju poradit jak napsat tpl. případně co do css... Díky

Link to comment
Share on other sites

Už jsem na to přišel, jediný problém byl v css.... :)

Funkční css:

/*** Home Categories Module  ***/
#homeCatWrapper ul {
text-align: center;
list-style: none;
}
#homeCatWrapper li {
float: left;
padding: 0px;
width: 183px;
}
#homeCatWrapper h5 a {
font-size: x-small;
color: #999;
}
#homeCatWrapper h5 a:hover {
text-decoration:underline;
color: #444;
}
#homeCatWrapper div {
width: 183px;
filter:alpha(opacity=80);
opacity: 0.8;
-moz-opacity:0.8;
border: 1px solid white;
}
#homeCatWrapper div:hover {
filter:alpha(opacity=100);
opacity: 1;
-moz-opacity:1;
border: 1px solid orange;
}
#homeCatWrapper img{width:100px;height:100px}

 

třeba to někomu pomůže... :)

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