Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu]Module news: exclure une catégorie spécifique d'actualités
#2

Salut, tu peux jouer avec cette condition dans ton gabarit de news :
Code :
{if $node.news_category_name != 'flash'}{/if}
et
{if $entry->category != 'flash'}
Le gabarit sample avec tes conditions placées :
Code :
<!-- Start News Display Template -->
{* This section shows a clickable list of your News categories. *}
{if $count > 0}
    <ul class="list1">
    {foreach from=$cats item=node}
    {if $node.news_category_name != 'flash'}
        {if $node.depth > $node.prevdepth}
            {repeat string="<ul>" times=$node.depth-$node.prevdepth}
        {elseif $node.depth < $node.prevdepth}
        {repeat string="</li></ul>" times=$node.prevdepth-$node.depth}
        </li>
        {elseif $node.index > 0}</li>
        {/if}
        <li{if $node.index == 0} class="firstnewscat"{/if}>
        {if $node.count > 0}
            <a href="{$node.url}">{$node.news_category_name}</a>
        {else}<span>{$node.news_category_name} </span>
        {/if}
    {/if}
    {/foreach}
    {repeat string="</li></ul>" times=$node.depth-1}</li>
    </ul>

    {* this displays the category name if you're browsing by category *}
    {if $category_name && $node.news_category_name == 'flash'}
        {if $pagecount > 1}
        <p>
            {if $pagenumber > 1}
            {$firstpage}&nbsp;{$prevpage}&nbsp;
            {/if}
            {$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}
            {if $pagenumber < $pagecount}
            &nbsp;{$nextpage}&nbsp;{$lastpage}
            {/if}
        </p>
        {/if}
    {/if}
    {foreach from=$items item=entry}
    {if $entry->category != 'flash'}
        <div class="NewsSummary">
        {if $entry->postdate}
            <div class="NewsSummaryPostdate">{$entry->postdate|cms_date_format}</div>
        {/if}
            <div class="NewsSummaryLink"><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a></div>
            <div class="NewsSummaryCategory">{$category_label} {$entry->category}</div>
        {if $entry->author}
            <div class="NewsSummaryAuthor">{$author_label} {$entry->author}</div>
        {/if}
        {if $entry->summary}
            <div class="NewsSummarySummary">{eval var=$entry->summary}</div>
            <div class="NewsSummaryMorelink">
                <a href="{$entry->moreurl}"><img src="uploads/images/icones/telechargement.png" width="50px" height="50px" alt="Voir la news de {$entry->title}"</a>
            </div>
        {else if $entry->content}
            <div class="NewsSummaryContent">{eval var=$entry->content}</div>
        {/if}
        {if isset($entry->extra)}
            <div class="NewsSummaryExtra">{eval var=$entry->extra}{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}</div>
        {/if}
        {if isset($entry->fields)}
            {foreach from=$entry->fields item='field'}
            <div class="NewsSummaryField">
            {if $field->type == 'file'}
                <img src="{$entry->file_location}/{$field->value}"/>
            {else}
                {$field->name}:&nbsp;{eval var=$field->value}
            {/if}
            </div>
            {/foreach}
        {/if}
        </div>
    {/if}
    {/foreach}
{/if}
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)