PHP code example of thelia / thelia-library-module

1. Go to this page and download the library: Download thelia/thelia-library-module library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

thelia / thelia-library-module example snippets


{getImages
  source_type="content"
  source_id=2
  filters=[
    '1440px' => 'hero_large_desktop',
    '1280px' => 'hero_small_desktop',
    '1024px' => 'hero_tablette',
    '768px' => 'hero_mobile',
    'default' => 'hero_default'
  ]
  img_attrs=[
    'width' => '768px',
    'height' => '660px',
    'class' => "test-class-img"
  ]
  wrapper="picture"
  wrapper_attrs=[
    'class' => "test-class-picture"
  ]
  img_style=[
    'display' => 'block'
  ]
  limit=1
  placeholder={encore_manifest_file file="dist/images/placeholder.webp"}
}