Ekskluzywne Strony Katalog stron   Dodaj link   Dodaj artykuł   Mapa  


How to Swap Banners According to Current Category?

In the banners.php file, you can insert arbitrary PHP-code, which will display banners depending on the current category.

The identifier of each category is displayed in the section «Categories Management» of the administrator interface.

To get the identifier of the current category, use:

$cid = $CNCAT["page"]["cid"];

Then, display banner depending on the category, for example:

if ($cid==10)

{

$CNCAT["banner"]["banner_identifier"] =<<<CNCAT_40_BANNER

banner code for the category 10

CNCAT_40_BANNER;

}

else

{

$CNCAT["banner"]["banner_identifier"] =<<<CNCAT_40_BANNER

banner code for other categories

CNCAT_40_BANNER;

}

 
Adres WWW: How to Swap Banners According to Current Category?
Kategorie:
Ocena moderatora: Nr
Ocena użytkowników: Nie
Przejścia do strony:2
Przejścia ze strony:0
Komentarze:

Brak komentarzy

Dodaj komentarz:

Nazwa:

E-mail:

Komentarz:

Twoja ocena:

Przepisz tekst z obrazka: