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

[Résolu]-article new avec vignette
#14

Je fais comme dit

le gabarit de sommaire des news

Code :
[== Indéfini ==]
{strip}
{foreach from=$items item=entry}
<h2 class="newsSummarytitle"><a href="{$entry->moreurl}"
title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a></h2>
<span class="NewsSummaryField">
{foreach from=$entry->fields item='field'}
{if $field->name == 'image' && $field->value neq ''}
       {capture assign='photoarticle'}uploads/news/id{$entry->id}/{$field->value}{/capture}<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}" class="alignleft">{cms_module module="CGSmartImage" alias='miniature_news' src=$photoarticle alt=$entry->title class="alignleft"}</a>
{elseif $field->name == 'imagePicker' && $field->value neq ''}
         {capture assign='photopicker'}
{* regex permettant de supprimer les dimensions et le alt mis automatiquement par le wysiwyg *}
{eval var=$field->value|regex_replace:'#<img\ssrc=\"(.*)\"\salt=\".*\"\swidth=\".*\"\sheight=\".*\"\s/>#':'$1'}{/capture}
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}" class="alignleft">
  {cms_module module="CGSmartImage" alias='miniature_news' src=$photopicker alt=$entry->title class="alignleft"}  </a>      
{/if}
{/foreach}
      </span>  

{if isset($entry->fields)}      
    {if $entry->postdate}
      <div class="postDate">{$entry->postdate|cms_date_format}
      </div> {/if}
      {if $entry->category}
      <div class="postCategory">{$entry->category}</div>
      {/if}
      {if $entry->author}
      <div class="postAuthor">{$entry->author}</div>
       {/if}
      <div class="clear"></div><hr class='borderb' />

{if $entry->summary}
      <div class="postSummary">{eval var=$entry->summary}
      </div>
      <div class="button grey small">{$entry->morelink}
      </div> {else if $entry->content}
      <div class="postSummary">{eval var=$entry->content}
      </div>{/if}
{/if}
      <div class="clear"></div>
      {/foreach}
{/strip}

dans CGSmartimage alias = miniature_news et options: filter_croptofit="50,50"quality='100'
------------------------------------------------------------------------------------------


adresse:le lien du site

-.
Sujet fermé


Messages dans ce sujet

Atteindre :


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