Display different header image depending on article section, but use same template?

Posted on 2010-08-25
Last Modified: 2012-05-10
I want to display a different header image depending on what article is being viewed on my Joomla 1.5 site.

My question is can this be done (and if so how) without using multiple joomla templates i.e. different template for each section?
Question by:TonyCabone
  • 5
  • 2

Expert Comment

ID: 33523237
Why don't you just add some php code that checks the url? Depending on the article you get different GET parameters. Use the article info to detect what image to use.

Author Comment

ID: 33523395
good point however I want something that will work for new articles that are added within a section i.e. new wine page = wine page template
LVL 11

Accepted Solution

Amanda Watson earned 450 total points
ID: 33525639
There is a module that does this, called Header Image

But I find an easy way to do this is to use a custom module, load up the image I want for a particular page and assign that module to that page.

you can then duplicate this process for how ever many images you want.

I guess this isn't really practical if you have hundreds of different images for different articles, but if you only have a dozen or so,  it works really well!

Author Comment

ID: 33527194
Hi Snowball,

That is what I'm after. I have around a dozen different images to display over about 40 articles.

One more thing though- is it possible to setup so that when my client adds a new article within a certain section, the module for that section is automatically assigned to that article?

I guess what I'm trying to do is assign the header images to it's respective section.
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

LVL 11

Expert Comment

by:Amanda Watson
ID: 33527219
Well yeah you could by setting up your menu to show items from a particular section/category
Then you assign the module with the image you want to that section/category, then when any article is added to that Section/Category it will show with that header....
Easy as!


Author Comment

ID: 33527455
Do I require the full commercial license to do this?

Author Comment

ID: 33527494
SORRY please ignore my last post

Author Closing Comment

ID: 33527514
love your work! :)

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

First of all, we will need Jumi component or Sourcerer plugin for this to work. We need either of these because the main focus here is custom development outside of the standard modules or articles within Joomla. You can find Jumi's my …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now