PHP code example of hschottm / tags

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

    

hschottm / tags example snippets


 if ($this->showTags): 

           foreach ($day['events'] as $event): 

Array(
  [0] => conference
  [1] => meeting
)

Array(
  [0] => Array(
    [url] => <a href=".../tags/conference.html">conference</a>
    [tag] => conference
    [class] => conference
  )
  [1] => Array(
    [url] => <a href=".../tags/meeting.html">meeting</a>
    [tag] => meeting
    [class] => meeting
  )
)

$GLOBALS['TL_DCA']['tl_literature']['palettes']['default'] = 'title,author,description,tags,content';

$GLOBALS['TL_DCA']['tl_literature']['fields']['tags'] = array
(
	'label'                   => &$GLOBALS['TL_LANG']['MSC']['tags'],
	'inputType'               => 'tag',
	'eval'                    => array('tl_class'=>'clr long'),
	'sql'                     => "char(1) NOT NULL default ''"
);