jomcdonald Posted June 23, 2011 Share Posted June 23, 2011 Bonjour,je souhaite afficher la description des sous catégories à coté de leur images mais je bute sur l'intégration du code.Si quelqu'un à une idée!!!Voici une image pour vous faire comprendre un peut mieux mon intention.Merci Link to comment Share on other sites More sharing options...
Fabien Serny Posted June 24, 2011 Share Posted June 24, 2011 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 More sharing options...
jomcdonald Posted June 24, 2011 Author Share Posted June 24, 2011 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 More sharing options...
Fabien Serny Posted June 24, 2011 Share Posted June 24, 2011 Poste ici le code ton template, peut être je pourrai aider Link to comment Share on other sites More sharing options...
jomcdonald Posted June 24, 2011 Author Share Posted June 24, 2011 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 More sharing options...
Fabien Serny Posted June 24, 2011 Share Posted June 24, 2011 Remplace ton par Et rajoute un style="float: left;" à ta balise Link to comment Share on other sites More sharing options...
jomcdonald Posted June 24, 2011 Author Share Posted June 24, 2011 Merci c'est parfait :-) Voici le résultat Link to comment Share on other sites More sharing options...
Fabien Serny Posted June 24, 2011 Share Posted June 24, 2011 N'oubliez pas passer le post en résolu Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now