We are attempting to set up a channel that manages advertising banners for our site, and can be classified in order to control which of the event entry pages they show on.
The event entries are created utilizing Solspace Calendar, and the advertising code that shows the banners is as follows:
<div class="widthlimit">
<div id="ad">
{exp:channel:entries channel="advertisements" limit="1" orderby="random" dynamic="no"}
Sponsored By:
<a href="http://{url-destination}" title="{title}" target="_blank" rel="noopener">{if banner-ad}{banner-ad}{if:else}{text-ad}{/if}</a>
{/exp:channel:entries}
</div><!--AD-->
</div>This allows the advertisement entry to be either a banner or a text link - HOWEVER we now need to be able to control which of the banners is displayed (right now it rotates from ALL the entries in the channel). Currently the entry page (where the code above is listed) is a dynamic page that showcases an entry of a selected calendar. We want to be able to associate a calendar with a specific group of ads.
Can we use categories (event entry category matches advertisement category)?
Should we use relationships (playa, etc)?
Suggestions?