Support » Plugin: EG-Attachments » [Plugin: EG-Attachments] Using media tags to create classes in the URL
5 years ago
If this plugin passed the tag into the URL of the document / file you’re attaching, you could define an icon for that tag (ie various types of pdf document – whitepaper / brochure / form etc…) could have different icons depending on the tag/class)
Anyone got any ideas on code or a fix for this?
Part of the way there – I’ve managed to pass the relevent document tag into the dt icon class by changing <dt class="icon"> to <dt class="icon-'.$tags.'"> on line 552 of eg-attachments-public.inc.php
might have to change dt to li so I can change the bullet icon for each class.
Just switch off ‘show icons’ in the widget settings and update the code below with the following for standard list format (lines 561 – 563 of eg-attachments-public.inc.php)
$output .= '<li class="attachments attachments-'.$tags.'">'.
implode('<br />', $caption_list).
– then just use css to replace the bullet point style with an image.