Jump to content

[Résolu] Intégrer la description des sous-catégories dans leur vignette


jomcdonald

Recommended Posts

Bonjour,

Un peu à l'arrache mais qui fonctionne, remplace ce code dans ton category.tpl


getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
                       {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
                       {else}

                       {/if}


getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}


par


getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" style="float: left;">
                       {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
                       {else}

                       {/if}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

                   {$subcategory.description}                    



Link to comment
Share on other sites

Merci pour la variable {$subcategory.description} J'y étais presque, j'utilisais {$subcategory.desc} :shut:
Par contre impossible de mettre la description à coté de l'image, elle se positionne en dessous tout le temps. Je joue avec le css mais rien ni fait.
A noter que mon template est assez modifié et que le code de mon category.tpl n'est pas le même se qui peut surement expliquer cela!!

Merci tout de même pour cette aide.

Link to comment
Share on other sites

Voila!! ;-)

category.css

/* category.tpl */
body#category #subcategories li { height: 50px; width: 375px; margin-right: 3px; margin-bottom: 20px; border: 1px solid #EEEEEE; }
div.cat_desc { margin: 1em 0 }
body#category div#subcategories .inline_list a img { display: block; height: 50px; width: 185px }
#category img#categoryImage { margin-top: 1em; height: 0px; width: 0px} /*height: 150px; width: 760px*/


la partie sous-catégories de category.tpl

{if isset($subcategories)}
       <!-- Subcategories -->

{l s='Subcategories'}

           {foreach from=$subcategories item=subcategory}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
                       {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategories')}" alt="" width="{$subcategoriesSize.width}" height="{$subcategoriesSize.height}" />{$subcategory.description} 
                       {else}

                       {/if}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

           {/foreach}




       {/if}



Et merci encore.

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