Jump to content

How to handle dynamic pages? Can't use standard ZoneID

Ken Wright

Recommended Posts

I am new to Revive, and have just set up the software.

I am the developer for a website that lists airline information. (It is written in ASP.Net, although that shouldn't matter for this question).  Each airline has an integer ID.  There is just one page really (airline.aspx), and it takes the AirlineID as a parameter to know which airline to display.

I want to be able to put one or more banner ads on the airline page.  Some will be general ads, but usually they will be targeted to a specific airline.

There are more than 1000 airlines so I don't want to create a zone ID for each one on the website.  And I don't want to have to update the ASP.Net code each time an airline gets its first ad.  

The javascript code I put on the page looks like this:
<ins data-revive-zoneid="123" data-revive-id="1234abcd1234abc..."></ins>


One thought I had was...

It looks like the zoneid is simply an incrementing integer value.  Is there any way to make it custom? For instance, instead of an integer it is "Airline-125". And then Revive would check if there was any ad for Airline125 and display it if so.   Or even more complex, "Airline-125-position-3" would look for an ad for the third ad position on the airline 125 page.

How can I do this with Revive?  If at all.

Thank you for your help.


Link to comment
Share on other sites

In the time waiting for this question to be approved, I have managed to hack something together using variables.

<ins data-revive-zoneid="2" data-revive-airlineid="123" data-revive-id="2....3"></ins>

The downside is that it isn't easy to use the same banner is multiple locations.  If I want to use the same image in multiple places it seems easier to just create multiple banners (of the same image) and set the airlineid on each one.  I wish the variable check was a property on the zone+banner pair, not just on the banner.

Still... if anyone has other suggestions please let me know.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...