display certain images on certain pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webandwe
    New Member
    • Oct 2006
    • 142

    display certain images on certain pages

    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
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    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

    Comment

    • vetrib2w
      New Member
      • Aug 2008
      • 14

      #3
      reply

      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.

      Code:
      <?php
      if ($_GET[view]=="frontpage") { ?> 
      class="wrapper-bfront"
       <?php
       } else { 
      ?> 
      class="wrapper-b" 
      <?php 
      } 
      ?>
      And $_GET[view] which tell you the name of the page.
      i think this will help you.
      Last edited by Markus; Nov 26 '08, 10:58 AM. Reason: added [code] tags.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        vetrib2w, please use [code] tags when posting code.

        Moderator.

        Comment

        Working...