Including contextual banner adverts in sidebar for news story
Posted: Thu May 31, 2007 3:38 pm
I have organised our news stories so that they are displayed on a separate detail page. What I want to be able to do is place contextual banner adverts to the left of the news story content in the main sidebar based on the news story category.
What I cannot work out is how to do it.
The "Detail Template" tab in the news module contains the template needed to display the news content.
The News Story detail page is empty but is linked to a News Story template which provides the main outer HTML including the top banner for the website and the left-hand sidebar navigation.
It is on the sidebar that I want to place the contextual banner advert images based on the news story category, but how do I refer to the news story category in the News Story template?
I thought the solution was to merge the news module "Detail Template" and the news page template into one.
To do this I attached a blank template to the News Story detail page and put all of the code from the News Module "Detail Template" tab and the original News Story template into the News Story "Detail Template" tab, but that didn't work...
Hence the "Detail Template" tab in my news module contained the following:
1. Site header and side navigation (which is where I would put conditional statements for outputting images based on the news category)
2. Code for processing the news story (what I had originally in the "Detail Template" tab)
3. Site footer
But as I said it didn't work. Am I misunderstanding something? The only way I can see is to access the category of the news story being displayed before it is displayed (if that makes sense!), but how do I do that?
TIA
What I cannot work out is how to do it.
The "Detail Template" tab in the news module contains the template needed to display the news content.
The News Story detail page is empty but is linked to a News Story template which provides the main outer HTML including the top banner for the website and the left-hand sidebar navigation.
It is on the sidebar that I want to place the contextual banner advert images based on the news story category, but how do I refer to the news story category in the News Story template?
I thought the solution was to merge the news module "Detail Template" and the news page template into one.
To do this I attached a blank template to the News Story detail page and put all of the code from the News Module "Detail Template" tab and the original News Story template into the News Story "Detail Template" tab, but that didn't work...
Hence the "Detail Template" tab in my news module contained the following:
1. Site header and side navigation (which is where I would put conditional statements for outputting images based on the news category)
2. Code for processing the news story (what I had originally in the "Detail Template" tab)
3. Site footer
But as I said it didn't work. Am I misunderstanding something? The only way I can see is to access the category of the news story being displayed before it is displayed (if that makes sense!), but how do I do that?
TIA