#1 (permalink)  
Alt 21.02.2008, 15:02
Neuer Benutzer
 
Registriert seit: 20.02.2008
Beiträge: 5
Standard Anzeige nur auf Startseite

Hallo zusammen,

ich habe soeben mein erstes XTC Projekt umgesetzt. Ich habe das Problem, dass ich den Banner nur auf der Startseite haben möchte und nicht auf allen Seiten. Gibt es in der index.html eine Möglichkeit eine if Abfrage einzubauen?

Siehe: http://www.stunna.de

Für eure Hilfe wäre ich sehr dankbar.

Viele Grüße
Stefan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 21.02.2008, 15:30
xt:Commerce Support Kunde
 
Registriert seit: 06.04.2006
Beiträge: 25
Standard

Hallo , als erstes.. in einer HTML seite kann man keine abfragen gestalten, es sei denn... es sind php-script-teile enthalten...

andere Frage... bist du neu?... ich bin Webentwickler aber hab noch kein eigenes projekt in sachen e-commerce... war die anwendung der Software leicht?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 21.02.2008, 16:03
Neuer Benutzer
 
Registriert seit: 20.02.2008
Beiträge: 5
Standard

Hallo,

ich bin neu hier im Forum. In die index Seite kann ich ja Abfragen einbauen, z.B. über Smarty Tags. Meine Frage ist allerdings, wie frage ich in meinem Fall die Startseite ab, damit ich sagen kann

if( startseite)
{
zeige div mit Banner
}

Hat jemand da eine Idee?

Vielen Dank und vielen Gruß
Stefan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 26.02.2008, 12:50
Neuer Benutzer
 
Registriert seit: 20.02.2008
Beiträge: 5
Standard

Hallo, das Thema ist noch aktuell. Hat wirklich niemand einen Rat wie man Inhalte auf der Startseite anzeigt und auf den restlichen Seiten ausblendet?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 26.02.2008, 12:55
Benutzerbild von tutsn
Erfahrener Benutzer
 
Registriert seit: 16.04.2005
Beiträge: 641
Standard

Probier mal in der index.html im Templateordner:

PHP-Code:
{php}
if (
$category_depth == 'top'){
{/
php}
Banner
{php}
}
{/
php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 07.04.2008, 12:12
xt:Commerce Support Kunde
 
Registriert seit: 03.09.2006
Beiträge: 142
Standard

Hallo,

durch eine kleine AEnderung in der Datei /index.php kann man es erkennen, auf welche Seite es sich befindet. Von der originalen Datei weicht die Code ab, da die originale Code "Content-Seite" nicht erkennt.

PHP-Code:
$category_depth 'home';

// the following cPath references come from application_top.php
if (isset ($cPath) && xtc_not_null($cPath)) {

  
$categories_products_query "select count(*) as total from ".TABLE_PRODUCTS_TO_CATEGORIES." where categories_id = '".$current_category_id."'";
  
$categories_products_query xtDBquery($categories_products_query);
  
$cateqories_products xtc_db_fetch_array($categories_products_querytrue);

  if (
$cateqories_products['total'] > 0) {
    
$category_depth 'products'// display products
  

  else 
  {
    
$category_parent_query "select count(*) as total from ".TABLE_CATEGORIES." where parent_id = '".$current_category_id."'";
    
$category_parent_query xtDBquery($category_parent_query);
    
$category_parent xtc_db_fetch_array($category_parent_querytrue);

    if (
$category_parent['total'] > 0
    {
      
$category_depth 'nested'// navigate through the categories
    

    else 
    {
      
$category_depth 'products'// category has no products, but display the 'no products' message
    
}
  }
}

$smarty->assign('CATEGORY_DEPTH'$category_depth); 
In der index.html kannst du mit folgenden Text nur anzeigen, was du willst.

PHP-Code:
{if $CATEGORY_DEPTH == 'home'}
WAS DU WILLST
{/if} 
Ein Problem muss noch beseitigt werden, also ich habe auch eine Frage:

Die Startseite-Erkennung funktioniert einwandfrei ausser wenn die Produkte nach Hersteller(bei Suche im Hersteller_Box) gelistet werden.

Was soll ich noch in index.php hinzufuegen oder was soll ich aendern? Kann jemand mir helfen?

Viele Gruesse

Geändert von Ralf-Peter (07.04.2008 um 14:00 Uhr)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 07.04.2008, 12:16
xt:Commerce Support Kunde
 
Registriert seit: 03.09.2006
Beiträge: 142
Standard

Das Problem geloescht.

Viele Gruesse

Geändert von Ralf-Peter (07.04.2008 um 12:56 Uhr)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 07.04.2008, 13:08
Erfahrener Benutzer
 
Registriert seit: 23.11.2007
Beiträge: 240
Standard

wie hast du es denn gelöst?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 07.04.2008, 13:24
xt:Commerce Support Kunde
 
Registriert seit: 03.09.2006
Beiträge: 142
Standard

Nur was in /index.php wie folgend geaendert.

PHP-Code:
$category_depth 'home'

// the following cPath references come from application_top.php 
if (isset ($cPath) && xtc_not_null($cPath)) { 

  
$categories_products_query "select count(*) as total from ".TABLE_PRODUCTS_TO_CATEGORIES." where categories_id = '".$current_category_id."'"
  
$categories_products_query xtDBquery($categories_products_query); 
  
$cateqories_products xtc_db_fetch_array($categories_products_querytrue); 

  if (
$cateqories_products['total'] > 0) { 
    
$category_depth 'products'// display products 
  
}  
  else  
  { 
    
$category_parent_query "select count(*) as total from ".TABLE_CATEGORIES." where parent_id = '".$current_category_id."'"
    
$category_parent_query xtDBquery($category_parent_query); 
    
$category_parent xtc_db_fetch_array($category_parent_querytrue); 

    if (
$category_parent['total'] > 0)  
    { 
      
$category_depth 'nested'// navigate through the categories 
    
}  
    else  
    { 
      
$category_depth 'products'// category has no products, but display the 'no products' message 
    

  } 

else
{
  if(
$_GET['manufacturers_id']) $category_depth 'search';
}

$smarty->assign('CATEGORY_DEPTH'$category_depth); 
Viele Gruesse

Geändert von Ralf-Peter (07.04.2008 um 13:51 Uhr)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 07.04.2008, 17:57
Erfahrener Benutzer
 
Registriert seit: 23.11.2007
Beiträge: 240
Standard

Vielen Dank für den Code. damit lassen sich wunderbar auch die Probleme mit der Itratos Slideshow lösen...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
anzeige, startseite

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Auf Startseite wird Artikel mit Langtext angezeigt deagh Shopbereich 34 24.07.2010 09:29
banner auf der startseite tita.lang Installation und Konfiguration 5 20.02.2008 08:25
Title auf Startseite SmokingElephant Template System 8 15.10.2007 10:37


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:29 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand