img

An article by Gaspard Bucher

Show an image.

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
  7. context
  8. dates
  9. display
    1. add_btn
    2. add_document
    3. admin_links
    4. comments_count
    5. content_lang
    6. design
    7. filter
    8. flash_messages
    9. h
    10. img
    11. javascripts
    12. mail_hide
    13. min / max
    14. search_box
    15. set
    16. show
    17. stat
    18. stylesheets
    19. summary
    20. text
    21. title
    22. uses_datebox
    23. zazen
    24. zena
  10. forms
  11. i18n
  12. meta
  13. SQLiss
  14. urls

Show an image.

  • src image source (can be a relation, default = ‘self’)
  • link transform image into link (target evaluated as RubyLess)
  • mode size of the image
  • alt_src alternate source to use if src is not an image
see zena 1.0

Display an “img” tag to show the current node.

Simplest example:

<r:img/>

Display an image with a different mode:

<r:img mode='pv'/>

Use the image in ‘preview’ mode to link to full object:

<r:img src='icon' link='this'/>

And finally, use an alternate source in case the current node (this) is not an image (alt_src is either RubyLess or a query):

<r:img alt_src='icon' mode='std'/>

The “icon” alternative source is a special keyword that is translated to the following SQLiss image or icon group by id,l_id order by l_id desc, position asc. This means that it will try to find the linked icon or it will use the first image in the object.