Hiding files by item type or collection?

So, I created a download link for files, however, we have some files that are just book covers. Those materials are in their own collection with a custom item type, ebook . I need to hide all of the files associated with the ebooks. I'm not sure if it would be easier to check for the collection and hide everything that way?

Suggestions for which is a better approach?

Here is the code I am using to display the files with a download link
This is what I did:
<?php if (metadata('item', 'has files')): ?>
<div id="collection" class="element">
<h3><?php echo __('Files for Download'); ?></h3>

<div class="element-text">"> "title="Right click to download files">
<img src="http://i1.wp.com/ctlblog.athenstech.edu/wp-content/uploads/2015/11/downloadblue1.png" align="center">
"> "title="Right click to download files">
<?php echo metadata('item', array('Dublin Core', 'Format')); ?>

</div>
<?php endif; ?>
</div>

If the behavior is consistent by the collection, that sounds like the quickest way at it. If you need something fancier, you could probably loop through all of the files and check the MIME type, and decide whether to print the link based on that.

I would need to look at mime type - thanks that gives me some thinking points.

This is the last piece of customization I need to get my site ready for prime time.

I am thinking I should just limit to collection - I do not think we will add more content in this category for a while.

I may be overthinking this but I am a little confused about which function to use for excluding the collection from my script below. I've read through all collection related functions but I'm still not sure - would that be get_collection or set_collections_for_loop?

I know which collection I want to exclude - collection 1. So, I don't need to actually get that collection id, as I have it.

Is there a way to just add another parameter to my collection name in the metadata function?

<?php if(metadata('item','Collection Name')): ?>
<div id="collection" class="element">
<h3><?php echo __('Collection'); ?></h3>
<div class="element-text"><?php echo link_to_collection_for_item(); ?></div>
</div>
<?php endif; ?>

<?php if (metadata('item', 'has files')): ?>
<div id="collection" class="element">
<h3><?php echo __('Files for Download'); ?></h3>

<div class="element-text">"> "title="Right click to download files">
<img src="http://i1.wp.com/ctlblog.athenstech.edu/wp-content/uploads/2015/11/downloadblue1.png" align="center">

"> "title="Right click to download files">
<?php echo metadata('item', array('Dublin Core', 'Format')); ?>

</div>
<?php endif; ?>

It looks like you are working with a mix of Omeka 1.5 and 2.x functions. set_collections_for_loop is 1.5, but metadata is 2.x, so there will be a little of that to sort out.

If this is still about not showing the link to files for the collection, all you'd need is a quick if statement:

<?php if(metadata('item', 'collection_id') != 1): ?>
(your code for linking to the files

<?php endif; ?>