Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-08-25
8
Medium Priority
?
421 Views
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?
0
Comment
Question by:TonyCabone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 3

Expert Comment

by:wuff
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.
0
 

Author Comment

by:TonyCabone
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
0
 
LVL 11

Accepted Solution

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

https://support.pillwax.com/open-source/doku.php?id=joomla: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!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:TonyCabone
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.
0
 
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!

0
 

Author Comment

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

Author Comment

by:TonyCabone
ID: 33527494
SORRY please ignore my last post
0
 

Author Closing Comment

by:TonyCabone
ID: 33527514
love your work! :)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

610 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