- b2evolution CMS User Manual
- Developer Reference
- Website Skins/Themes
- Skin Tags / API
- Item Tags
- Template Tag: Item Images
Template Tag: Item Images
Display the images linked to the current Post/Item.
Example
Quick Template
[Item:images|before=<div class="evo_images">|after=</div>|image_size=fit-720x500]
PHP Template
$Item->get_images( array(
'before' => '<div>',
'before_image' => '<div class="image_block">',
'before_image_legend' => '<div class="image_legend">',
'after_image_legend' => '</div>',
'after_image' => '</div>',
'after' => '</div>',
'image_size' => 'fit-720x500',
'image_size_x' => 1, // Use '2' to build 2x sized thumbnail that can be used for Retina display
'image_link_to' => 'original', // Can be 'original' (image) or 'single' (this post)
'limit' => 1000, // Max # of images displayed
'before_gallery' => '<div class="bGallery">',
'after_gallery' => '</div>',
'gallery_image_size' => 'crop-80x80',
'gallery_image_limit' => 1000,
'gallery_colls' => 5,
'gallery_order' => '', // 'ASC', 'DESC', 'RAND'
'gallery_link_rel' => 'lightbox[p'.$this->ID.']',
'restrict_to_image_position' => 'teaser,teaserperm,teaserlink,aftermore', // 'teaser'|'teaserperm'|'teaserlink'|'aftermore'|'inline'|'cover'
'data' => & $r,
'get_rendered_attachments' => true,
'links_sql_select' => '',
'links_sql_orderby' => 'link_order',
) );
Parameters
Param |
Default |
Usage |
---|---|---|
|
|
Displayed before all the images. |
|
|
Displayed before each image. |
|
|
Displayed before the image legend. |
|
|
Displayed after the image legend. |
|
|
Displayed after each image. |
|
|
Displayed after all the images. |
|
|
Image size to fit. |
|
|
Use |
|
|
Simplified "sizes=" attribute for browser to select correct size from "srcset=". Must be set DIFFERENTLY depending on WIDGET/CONTAINER/SKIN LAYOUT. Each time we must estimate the size the image will have on screen. Sample values: |
|
|
Where do we want to link to when the image is clicked. Possible values: |
|
|
Used when |
|
|
Used when |
|
|
Used when |
|
|
Maximum of images displayed. If |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Possible values |
|
|
|
|
|
Possible values: |
|
|
HTML to be displayed if no image; possible codes: |
|
|
|
|
|
|
|
|
|
|
|
Return value
This tag displays content only, it does not have a return value.