b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Developer Reference
  3. Website Skins/Themes
  4. Skin Tags / API
  5. Item Tags
  6. 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

before

<div>

Displayed before all the images.

before_image

<div class="image_block"> for PHP templates
<figure class="evo_image_block"> for quick templates

Displayed before each image.

before_image_legend

<div class="image_legend"> for PHP templates
<div class="evo_image_legend"> for quick templates

Displayed before the image legend.

after_image_legend

</div>

Displayed after the image legend.

after_image

</div>

Displayed after each image.

after

</div>

Displayed after all the images.

image_size

fit-720x500

Image size to fit.

image_size_x

1

Use 2 to build 2x sized thumbnail that can be used for Retina display

image_sizes

NULL

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: (max-width: 430px) 400px, (max-width: 670px) 640px, (max-width: 991px) 720px, (max-width: 1199px) 698px, 848px

image_link_to

original

Where do we want to link to when the image is clicked. Possible values: original (image), single (post), a URL or empty.

target_blog

''

Used when image_link_to = single.

post_navigation

''

Used when image_link_to = single.

nav_target

NULL

Used when image_link_to = single.

limit

1000

Maximum of images displayed. If 'limit' => '#' then no limitation.

before_gallery

<div class="bGallery">

after_gallery

</div>

gallery_image_size

crop-80x80

gallery_image_limit

1000

gallery_colls

5

gallery_order

''

Possible values ASC, DESC, RAND

gallery_link_rel

'lightbox[p'.$this->ID.']'

restrict_to_image_position

teaser,teaserperm,teaserlink,aftermore

Possible values: teaser, teaserperm, teaserlink, aftermore, inline, cover.
#teaser_all => teaser,teaserperm,teaserlink,
#cover_and_teaser_all => cover,teaser,teaserperm,teaserlink

placeholder

''

HTML to be displayed if no image; possible codes: #folder_icon

data

& $r

get_rendered_attachments

true

links_sql_select

''

links_sql_orderby

link_order

Return value

This tag displays content only, it does not have a return value.

Created by fatimahnasra • Last edit by winskie on 2020-03-26 07:47 • •

No feedback yet

On this page

  • Example
  • Quick Template
  • PHP Template
  • Parameters
  • Return value

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
    • Website Skins/Themes
      • Skin Development Primer
      • Loading additional resources into a skin
      • Where are the skin files?
      • CSS Guidelines
      • Targeted CSS Selectors
      • Introducing evoSkins
      • Modifying evoSkins
      • Creating evoSkins
      • Skin Tags / API
        • Template functions
        • Template Tags
        • Tag Plugins Call By Code
        • Tag User Subs Link
        • Tag User Register Link
        • Tag User Profile Link
        • Tag User Logout Link
        • Tag User Login Link
        • Tag Skin Get URL
        • Tag Skin Get Path
        • Tag Skin Container
        • Tag Powered By
        • Tag Is Logged In
        • Include Disp
        • Tag Display If Empty
        • Tag Comment Allowed Tags
        • Tag Blog Tagline
        • Tag Blog Name
        • Tag Blog Longdesc
        • Tag Blog Home Link
        • Tag Blog Footer
        • Tag Blog Contact Link
        • app_version();
        • Tag Request Title
        • Include Item Content
        • User::get_identity_link()
        • Item Tags
          • Anchor -
          • Author +
          • Categories +
          • Category Name+
          • Content Teaser +
          • Contents Last Updated +
          • Creation Time +
          • Custom Fields +
          • Edit Link +
          • Excerpt +
          • Extra Status -
          • Feedback Feed Link -
          • Feedback Link +
          • Files +
          • Flag +
          • Footer +
          • Has Feedback Raw -
          • History Link +
          • ID +
          • Image URL +
          • Images +
          • Intro-Tag
          • Lang Raw -
          • Locale Flag +
          • Locale Raw -
          • Main Category -
          • Mod Time -
          • More Link +
          • Msgform Link +
          • Msgform Link Assigned !
          • Page Links +
          • Permanent Link +
          • Permanent URL -
          • Priority -
          • Propose Change Link +
          • Publish Link !
          • Read Status +
          • Tag Item Can Comment
          • Tag Item Can Rate
          • Tag Item Can Recieve Pings
          • Tag Item Deadline Date
          • Tag Item Deadline Time
          • Tag Item Deprecate Link
          • Tag Item Feedback Moderation
          • Tag Item Language
          • Tag Item Locale Temp Switch
          • Tags +
          • Template Tag: Item Background Image CSS
          • Template Tag: Item Content Extension
          • Template Tag: Item Custom
          • Template Tag: Item Issue Date
          • Template Tag: Item Issue Time
          • Template Tag: Item Last Edit User
          • Template Tag: Item Last Touched
          • Template Tag: Item Mod Date
          • Template Tag: Item Refresh Contents Last Updated Link
          • Title +
          • Trackback RDF Raw -
          • Trackback URL Raw -
          • Type Raw -
          • Visibility Status +
          • Visibility Status Raw -
          • Wordcount Raw -
        • Category Tags
        • User Tags
        • Other Tags
      • Styling widgets
      • Skin Quality Control
      • Using HTML 5 tags
      • Using Custom Item Templates
      • Using bootstrap classes in footers
      • Using Grunt
      • Dev Menu
      • How to add a Google Font (WebFont) ?
      • Custom Fields in a Template
      • Site Skins
    • Email Skins/Themes
    • b2evolution Files
    • Website Integration
    • Plugins
    • Debugging
    • Technical Reference
    • Hacks
    • Credits
    • Development
    • How to... (Customize)
    • Scheduled Tasks Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Responsive CMS

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque