I have taken over a site that has tons of ads. They are probably not well organized or set up, but that is immaterial.

There is a header ad on some pages and not others. This is currently done through the block visibility settings. While I have no significant problem with setting it up this way, they now have 11 blocks defined like this and now want "display this one anywhere another one is not displayed." So that means not only going through each one of those 11 blocks and collecting which pages they are displayed on and then putting that list into this new one. Further, this is a maintenance nightmare.

Is there a better way to say "Put ad 1 on page a, put ad 2 on page x, and put ad d everywhere else"?

Comments

jeremy’s picture

In the 6.x branch of the module the ad_channel module was designed for this. Unfortunately this code was never stabilized in the 5.x branch -- code exists in the 5.x-2.x branch but it's outdated and may or may not work for you / is not supported in any way. (That branch is only available directly from CVS)

nancydru’s picture

Status: Active » Closed (fixed)

Thanks, 6.x for this site is months away yet, and will probably be done by Acquia.

nancydru’s picture

Status: Closed (fixed) » Active

Follow up: It looks like they largely put each ad in its own group; is there a good reason for that? It would seem to me that ads would generally be grouped by theme region.

jeremy’s picture

As you suggest, I group my ads by theme region. Of course, there's nothing saying you have to do it that way. I can not think of any good reason why you'd put every ad in its own group.

nancydru’s picture

Does that have to do with "Put ad 1 on page a, put ad 2 on page x,..."?

jeremy’s picture

Ah, indeed, I imagine so.

Another method of doing what you want would be to create a custom PHP block that calls ad() directly, specifying different ads depending on whatever rules you have. Not sure this is any easier though.

nancydru’s picture

No, I don't think it would be. But it does give me an idea: This is a CCK/Views/Nodequeue/Panels site, so I might be able to add a field to the content or panel def to specify which ad they want, and if none is given, then use a default. I will look at that.

jeremy’s picture

Status: Active » Fixed

Information provided, closing issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.