Hi Al, thanks again for the interest and help.
I attached again the database preset, with the script you posted here: https://moodle.org/mod/forum/discuss.php?d=344634
If you want i could give you access to my development server in private message.
The idea is to have different look&feels when the entries are pdf and when they are images. Somethink like the images attached, where i also identify with a red line which filter is active (is that possible?)
Very thankful!