Author Topic: Kategorien und Unterkategorien / Categories and Subcategories  (Read 9806 times)

0 Members and 1 Guest are viewing this topic.

Offline kleiner_Hobbit

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Berlin in Bildern
Kategorien und Unterkategorien / Categories and Subcategories
« on: January 25, 2006, 08:40:30 PM »
Hi Leute,

in der normalen Kategorie-Übersicht werden bei meinem Template die Kategorien wie folgt angezeigt:
my actual Category-Overview looks like this:



Ich suche eine Möglichkeit, dass jede Unterkategorie in einer neuen Zeile angezeigt wird, also in etwa so:
I´m looking for a code to show the categories and subcategories like this (a new line for each subcategory) :

Asien
Japan-Reisebericht
Kambodscha
Laos
Thailand ....

Kann mir jemand dabei helfen?
Can anybody help me with this problem?

Viele Grüße / best wishes

Claudia

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #1 on: January 25, 2006, 08:48:01 PM »
Hallo Claudia,

1. ... tolle Bilder auf deiner Seite ...  :wink:
2. ... finde in /includes/functions.php folgendes ...
Code: [Select]
  foreach ($visible_cat_cache as $subcat_id) {
    if ($i <= $num_subs && $i <= $config['num_subcats']) {
      $sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
      $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".$cat_cache[$subcat_id]['cat_name']."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= ", ";
      }
      if ($i == $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= " ...\n";
      }
    }
    $i++;
  }

... und ändere es wie folgt ...
Quote
  foreach ($visible_cat_cache as $subcat_id) {
    if ($i <= $num_subs && $i <= $config['num_subcats']) {
      $sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
      $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".$cat_cache[$subcat_id]['cat_name']."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= "<br>";
      }
      if ($i == $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= " ...\n";
      }
    }
    $i++;
  }

... das war's dann schon ...

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline kleiner_Hobbit

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Berlin in Bildern
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #2 on: January 25, 2006, 09:01:32 PM »
Boah ... das war ja schneller als die Feuerwehr!

Ich habe es gleich probiert und es funktioniert wunderbar! DANKE!!!

Ich hätte da gleich noch eine Frage zur Kategorieansicht  :?:
Kann man auch ggf eine weitere Ebene Unterkategorien anzeigen lassen, dass es dann in etwa so aussieht:

Just another question to show categories.
Is it possible to show the next level of subcategories (sub-subcategory) in an Overview?


Deutschland
     Berlin
     - Berlin - Diverse
     - Berlin - Regierungsviertel
     - Festival of Lights 2005
     Potsdam

Viele Grüße

Claudia

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #3 on: January 25, 2006, 09:11:11 PM »
Sorry to interrupt but I'm simply curious to know what are the significations of this topic. Could someone (probably Mawenzi - if possible) translate the subject in english ? ;)

Offline kleiner_Hobbit

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Berlin in Bildern
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #4 on: January 25, 2006, 09:23:27 PM »
@TheOracle
Didn´t you read the blue lines in my first post?
I did my best to translate my problem in english  :mrgreen:


Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #5 on: January 25, 2006, 09:29:46 PM »
Ah ! just got it. Sorry for interrupting this. :mrgreen:

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #6 on: January 26, 2006, 11:33:08 PM »
Hallo Claudia,

... das ist sicher machbar, doch ist dieses Problem nicht so leicht wie oben zu lösen ...  :?
... dazu müsste in der functions.php einiges neu gecodet werden ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline kleiner_Hobbit

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Berlin in Bildern
Re: Kategorien und Unterkategorien / Categories and Subcategories
« Reply #7 on: January 27, 2006, 01:17:07 AM »
Schade ... aber trotzdem vielen Dank für die Antwort  :)

Falls mal jemand Lust hat den Code zu ändern würde ich mich sehr freuen   :mrgreen: