[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/design/standard/templates/content/datatype/view/ -> ezimage.tpl (source)

   1  {* DO NOT EDIT THIS FILE! Use an override template instead. *}
   2  {*
   3  Input:
   4   image_class - Which image alias to show, default is large
   5   css_class     - Optional css class to wrap around the <img> tag, the
   6                   class will be placed in a <div> tag.
   7   alignment     - How to align the image, use 'left', 'right' or false().
   8   link_to_image - boolean, if true the url_alias will be fetched and
   9                   used as link.
  10   href          - Optional string, if set it will create a <a> tag
  11                   around the image with href as the link.
  12   border_size   - Size of border around image, default is 0
  13  *}
  14  {default image_class=large
  15           css_class=false()
  16           alignment=false()
  17           link_to_image=false()
  18           href=false()
  19           target=false()
  20           hspace=false()
  21           border_size=0}
  22  
  23  {let image_content=$attribute.content}
  24  
  25  {section show=$image_content.is_valid}
  26  
  27      {let image=$image_content[$image_class]}
  28  
  29      {section show=$link_to_image}
  30          {let image_original=$image_content['original']}
  31          {set href=$image_original.url|ezroot}
  32          {/let}
  33      {/section}
  34      {switch match=$alignment}
  35      {case match='left'}
  36          <div class="imageleft">
  37      {/case}
  38      {case match='right'}
  39          <div class="imageright">
  40      {/case}
  41      {case/}
  42      {/switch}
  43  
  44      {section show=$css_class}
  45          <div class="{$css_class|wash}">
  46      {/section}
  47  
  48      {section show=$href}<a href={$href}{section show=and( is_set( $link_class ), $link_class )} class="{$link_class}"{/section}{section show=and( is_set( $link_id ), $link_id )} id="{$link_id}"{/section}{section show=$target} target="{$target}"{/section}>{/section}
  49      {section show=and( is_set( $image ), $image )}
  50          <img src={$image.url|ezroot} width="{$image.width}" height="{$image.height}" {section show=$hspace}hspace="{$hspace}"{/section} style="border: {$border_size}px;" alt="{$image.text|wash(xhtml)}" title="{$image.text|wash(xhtml)}" />{section show=$href}</a>{/section}
  51      {/section}
  52  
  53      {section show=$css_class}
  54          </div>
  55      {/section}
  56  
  57      {switch match=$alignment}
  58      {case match='left'}
  59          </div>
  60      {/case}
  61      {case match='right'}
  62          </div>
  63      {/case}
  64      {case/}
  65      {/switch}
  66  
  67      {/let}
  68  
  69  {/section}
  70  
  71  {/let}
  72  
  73  {/default}


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7