+ Antworten
Ergebnis 1 bis 5 von 5

Thema: Headergrafik abgängig vom Bereich/Kategorie

  1. #1
    Neu an Board
    Registriert seit
    10.12.2007
    Beiträge
    3
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard Headergrafik abgängig vom Bereich/Kategorie

    Ich möchte gerne in einem Template die Grafik im Header der Seite abhängig vom Bereich auf dem man sich gerade befindet wechseln.

    Habe mir das so in der Art gedacht:
    Code:
    <a href="<?php echo JURI::base(); ?>">
    <?php
    switch($mainframe->getPageTitle())
    {
       case 'Geschichte':
          $bild='header_geschichte.jpg';
          break;
       case 'Aufzucht':
          $bild='header_aufzucht.jpg';
          break;
     case 'Besatz':
          $bild='header_besatz.jpg';
          break;
       default:
          $bild='header1.jpg';
          break;
    }
    ?>
              <img src="<?php echo $bild ?>" alt="<?php echo JApplication::getCfg('sitename') ?>" />
            </a>
    Mein Problem ist aber das ich nur den Seitentitel auslesen kann und der ist auf jeder Unterseite anders.

    Kann mir jemand sagen wie dich den Bereichsnamen auslesen kann? Ich finde leider nichts darüber oder Suche nach den falschen Begriffen.

    lg

  2. #2
    Neu an Board
    Registriert seit
    20.11.2006
    Beiträge
    61
    Bedankte sich
    1
    Erhielt 2 Danksagungen
    in 2 Beiträgen

    Standard

    Warum das Rad neu erfinden ;-) Vielleicht ist hier das passende dabei:

    Header tauschen - kostenlos
    Flexheader2
    http://flexheader2.andrehotzler.de/d...mentation.html

    Flexheader2 is a Modul that displays an image or an DIV with an image as its background in dependency of $Id and $ItemId. Flexheader2 enables you to assign a specific picture to an article, menu entry or category/section view.


    Fluxheader
    http://extensions.joomla.org/extensi...s/5185/details

    Fluxheader embeds images based on variables taken from the page context. It builds a filename using these variables as parts and includes an image if an image file exists in a particular folder. Variables that can be used to determine the image for the current content include:
    - Item ID or Alias; the active menu item,
    - Option; the component responsible for the current content (e.g. mod_contact or mod_content),
    and for articles (mod_content):
    - Section ID or Alias,
    - Category ID or Alias,
    - Content ID or Alias.


    Das schweizer Taschenmesser ;-) CC-Lizenz und kommerziell
    Header Image Module
    http://technology.pillwax.com/header-image

    This module allows to change images or animations based on the current Context a Joomla Page is in. Section-, Category-, Main Menu, Current Menu Item, Content or Author ID of the actual content are correlated to images that this module shows. Supports default image file, checks for presence of image files, random default images and Slideshow of images. With its ability to support HTML Code integration also Flash files or any other webobjects can be used in addition to static images.
    And more: Multiple instances of the module and instance locking between them, time and date rules for activation allow even more flexibility to display different sets for days, weeks, holiday periods. Multilanguage support in combination with JoomFish to localize image sets to different languages.


    Alternative per CSS
    Menu Dependent Items
    http://extensions.joomla.org/extensi...g/5465/details

    This Module displays an image or loads a CSS-File from your choosen directory depending recursively on the active menu item and the menus structure. It is usefull for e.g. to simply change header images or the color of article titles. But it can be very powerful too by completely changing the view of your website by adding different style sheets depending on the active menu item without the need of making multiple templates.


    eingeschränkte Alternative
    Linked Image

    http://extensions.joomla.org/extensi...s/4991/details
    The Linked Image module allows you to associate a particular image with any given article. It does this by matching the file name with the article ID or Item ID being displayed. For example you could use this plugin to display an image of food in the header when on a menu page.


    CU

  3. Erhielt Danksagungen von:


  4. #3
    Kommt häufiger vorbei
    Registriert seit
    14.11.2008
    Beiträge
    252
    Bedankte sich
    43
    Erhielt 5 Danksagungen
    in 5 Beiträgen

    Standard

    Hi, was mir besser geholfen hat, war das hier:

    http://www.joomlaportal.de/joomla-te...-template.html

    Für mich DAU einfacher anzuwenden als flexheader.

    Viel Glück!
    Gruß Gaby

  5. #4
    Verbringt hier viel Zeit Avatar von PrfFrost
    Registriert seit
    03.01.2006
    Beiträge
    652
    Bedankte sich
    3
    Erhielt 163 Danksagungen
    in 146 Beiträgen

    Standard

    ich habe für die Headergrafik ein costum modul erstellt ... und binde dadurch für jede seite eine andere Grafik ein.
    GB♫ - GAS - WB - BT - GIG - JH - FB - DA - TW - WW

  6. #5
    Neu an Board
    Registriert seit
    10.12.2007
    Beiträge
    3
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard Danke für eure Hilfe

    Habe das Problem mit

    Menu Dependent Items

    gelöst. Funktioniert super!

    Danke

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein