PHP code example of guave / assetload-bundle

1. Go to this page and download the library: Download guave/assetload-bundle 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/ */

    

guave / assetload-bundle example snippets


{{ css('file-name')|raw }}
{{ js('file-name')|raw }}

 use Guave\AssetLoadBundle\Helper\AssetHelper; 

{{ svg(TL_ROOT.'files/project-name/images/file-name.svg')|raw }}

 use Guave\AssetLoadBundle\Helper\AssetHelper; 

{% extends dynamic_template_path('base') %}

{% extends dynamic_template_path('base', 'test') %}

{{ contao_figure('path/to/my/image.png', '_medium_photo') }}

{{ contao_figure('image_id', [200, 200, 'proportional'], { 
  metadata: { alt: 'Contao Logo', caption: 'Look at this CMS!' },
  enableLightbox: true,
  lightboxGroupIdentifier: 'logos',
  lightboxSize: '_large_photo',
  linkHref: 'https://contao.org',
  options: { attr: { class: 'logo-container' } }
}) }}