[REGLE] Image de la sous catégorie

More
14 years 2 months ago - 14 years 2 months ago #10924 by lima2x
Bonjour,
Pourriez vous m'aider pour les lignes de code à rajouter au category_subcategories.php pour afficher l'image de la sous-catégorie devant le nom de la sous-catégorie dans la liste des sous-catégories d'une catégorie ?
J'ai essayé de bidouiller mais je n'y arrive pas ...
Help ...
Last edit: 14 years 2 months ago by lima2x.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #10935 by simjoubert
Bonjour j'ai réussi à incorporer les images des sous catégories d'une catégorie voici mon fichier category_subcategories.php

Code:
<?php /** * @version 1.5 stable $Id: category_subcategories.php 171 2010-03-20 00:44:02Z emmanuel.danan $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); ?> <?php $n = count($this->categories); $i = 0; ?> <link href="css/flexicontent.css" rel="stylesheet" type="text/css" /> <div class="subcategorieslist"> <div class="subcatLegend"><?php echo JText::_( 'FLEXI_SUBCATEGORIES' ) . ' : '; ?></div> <div class="subcategorieslist2"> <?php foreach ($this->categories as $sub) : $subsubcount = count($sub->subcats); ?> <div class="subcatBloc"> <div class="subcatTitle">[url=<?php echo JRoute::_( FlexicontentHelperRoute::getCategoryRoute($sub->slug) ); ?>]<?php echo $this->escape($sub->title); ?>[/url]</div> <div class="subcatImage"> <?php if($sub->image) :?> <?php $imageSubcat=JHTML::_('image.site', $sub->image, 'images/stories/', NULL, NULL, $sub->title);?> <?php $imageR=str_replace("/>","width=\"120px\"/>",$imageSubcat);?> <?php echo $imageR;?> <?php endif; ?> </div> <div class="subcatDesc"> <?php echo flexicontent_html::striptagsandcut(htmlspecialchars_decode($this->escape($sub->description)),400); ?> </div> <div class="subcatNbarticle"><?php if ($this->params->get('show_itemcount', 1)) echo ' Dont ' . ($sub->assigneditems != null ? $sub->assigneditems.' article(s) et '.$subsubcount : ''.$subsubcount) . ' sous-cat&eacute;gorie(s)'; $i++; if ($i != $n) : echo ' '; endif; ?></div> </div> <?php endforeach; ?> </div></div>

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #10947 by pabro
Thank you!!!
That's exactly what I was looking for.

How i must edit this, to get the description without stript html-tags?
Code:
<?php echo flexicontent_html::striptagsandcut(htmlspecialchars_decode($this->escape($sub->description)),400); ?>

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #10971 by simjoubert
bonjour
relis le superbe tutos blog.netassopro.com/tutoriel-template-fl...le-template-contenu/ c'est une mine d'information on attend la suite avec le 5eme tutos justement consacré aux template de catégorie...

cette comande te permet de couper proprement la valeur d'un champ texte selon un nombre de caractères.

bonne soirée

ps: je suis peut-être planter sur ta question , mais je suis une bille en anglais!
see you!

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #10976 by micker
yes c'est clair que ces tutos sont tops !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #10989 by lima2x
Merci à tous,
C'est parfait et bravo pour le tuto.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.362 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline