473,383 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

display certain images on certain pages

142 100+
Hi,

How can I check which page I'm on and display the image I want on that page.

I'm using joomla. Now I want to change the header image on some pages but can't do it now because all the pages works off from the index file.

Thanks
Nov 25 '08 #1
3 1160
nathj
938 Expert 512MB
Hi Webandwe,

Before I outline my approach to this problem I must say I've never used Joomla. So, with that caveat here is what I would do.

1. Have a table with page_id and page_image_url stored in it.
2. For each page on the site I would assign a unique page ID and store it either in the query string or the $_SESSION.
3. When each page fires up check that value and retrieve the image location from the database

I hope that helps you to see a way forward. If you already have some code that needs tweaking or looking over feel free to post it here and get some input on it.

Cheers
nathj
Nov 25 '08 #2
Hi,
find the index.php in templete folder and there i added this code to use the different class name for frontpage and other page.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if ($_GET[view]=="frontpage") { ?> 
  3. class="wrapper-bfront"
  4.  <?php
  5.  } else { 
  6. ?> 
  7. class="wrapper-b" 
  8. <?php 
  9. ?> 
And $_GET[view] which tell you the name of the page.
i think this will help you.
Nov 26 '08 #3
Markus
6,050 Expert 4TB
vetrib2w, please use [code] tags when posting code.

Moderator.
Nov 26 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Graham J | last post by:
Hello, Apologies for the somewhat wordy and garbled subject as I couldn't think how to phrase it and this has hindered my searching for any previous answers. It could be a really simple...
1
by: Laurie Dvorak | last post by:
I'm working on converting a website that currently is all static HTML pages to ASP.NET. Since people may have some of the HTML pages bookmarked, I want to give them a meaningful error message...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
13
by: Jim Carlock | last post by:
I have over a hundred pictures I would like to present. Is it practical to create and parse an array of pictures, picture paths, et al using server-side scripting to accomplish this? I...
0
by: mhospodarsky | last post by:
Hi-- I am having trouble with bitmap images displaying. They are bitmap versions of icons. I have a program that uses these bitmap images to display at certain points specified in a layer. I...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
5
by: David Thielen | last post by:
Hi; Ok, I will be the first to agree that this should be impossible - except we are able to keep repeating it. Our login page - which has moderately complex html and uses <LayoutTemplate> to...
2
by: Evan M. | last post by:
Hello there, I have an interesting problem to takle. I'm creating a website that's going to be run in a local Intranet. The site uses a MasterPage / content page scheme, with the Master page...
18
by: coachjerry | last post by:
I'm a senior citizen with a tech background, though a newbie to programming and style sheets. I'm usually able to make HTML and css changes to existing designs, but I'm stuck on this one and would...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.