Hallo, ich bräuchte in Alberghi für das Modul "Kategorien Anzeigen" (das ist praktisch die Menüauswahl auf Grund der eingerichteten Kategorien) entweder Unterkategorien (also z.B. Hauptkategorie Deutschland, darunter dann Unterkategorien Hamburg, Bayern, Baden-Würtemberg etc.) oder alternativ das Modul so geändert, daß es die Einträge unter Regionen (den Eintrag gibts ja) bzw. Stadt anzeigt. In jedem Fall also eine zweite Kategorie oder eben Unterkategorie bzw. Selektierung nach Ort/Region.

Das Modul hat nur 20 Zeilen, aber ich hab keinen Plan...

-----

<?php
/**
* @version $Id: mod_jmovies_categories.php 2820 2006-04-22 09:12:28Z
* @package Joomla_1.0.0
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Accesso ristretto' );

global $_CONFIG, $database, $my;

$params->def('moduleclass_sfx', '');
$params->def('img', '0');
$moduleclass_sfx =$params->get('moduleclass_sfx');

# determino Itemid della componente alberghi
$query_id = "SELECT id FROM #__menu WHERE link='index.php?option=com_alberghi' AND published='1'";
$database->setQuery($query_id);
$rows = $database->loadObjectList();
$Itemid=$rows[0]->id;
$option="com_alberghi";
?>

<table cellspacing="0" cellpadding="0" width="100%" border="0">
<?php
$query1="SELECT id, title FROM #__categories WHERE section = '".$option."' AND published = '1' AND access <= '".$my->gid."' ORDER BY name ASC";
$database->setQuery($query1);
$rows = $database->loadObjectList();

foreach($rows as $row1) {
// determino numero di strutture per ogni categoria
$database->setQuery("SELECT count(id) FROM #__alberghi WHERE published = '1' AND catid = '".$row1->id."'");
$count = $database->loadResult();
?>
<tr align="left">
<td>
<a href="<?php echo sefRelToAbs("index.php?option=".$option."&amp;Item id=".$Itemid."&amp;task=viewcategory&amp;catid=".$ row1->id)?>">
<?php if($params->get('img')){ ?>
<img src="components/<?php echo $option?>/images/home.png" align="absmiddle" hspace="6" height="25" width="25" border="0" alt="<?php echo $row1->title?>"/>
<?php } ?>
</a>
<a href="<?php echo sefRelToAbs("index.php?option=".$option."&amp;Item id=".$Itemid."&amp;task=viewcategory&amp;catid=".$ row1->id)?>" class="<?php echo (($moduleclass_sfx) ? 'mainlevel'.$moduleclass_sfx : 'mainlevel' )?>"><?php echo $row1->title ?> ( <?php echo $count ?> )</a></span>
</td>
</tr>
<?php
} ?>
</table>