im a big fan and user of joomla, but working on my last website brought me to some curious lines of code in the main output file under "/components/content.html.php". Maybe its an old relict form mambo times, because it can be found in every joomla version. And because its so obviously, i am not sure, if its a bug or a feature
These lines can be found in the main function "function showContentList" starting from line 28 (V.1.0.11), when it comes to the output of the category description:
Code: Select all
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>">
<?php
if ( $params->get('description') || $params->get('description_image') ) {
?>
<tr>
<td width="60%" valign="top" class="contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>" colspan="2">
<?php
if ( $params->get('description_image') && $title->image ) {
$link = $mosConfig_live_site .'/images/stories/'. $title->image;
?>
<img src="<?php echo $link;?>" align="<?php echo $title->image_position;?>" hspace="6" alt="<?php echo $title->image;?>" />
<?php
}
if ( $params->get('description') ) {
echo $title->description;
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<td width="100%">
<?php
// Displays the Table of Items in Category View
if ( $items ) {
HTML_content::showTable( $params, $items, $gid, $catid, $id, $pageNav, $access, $sectionid, $lists, $order );
} else if ( $catid ) {
?>
<br />
<?php echo _EMPTY_CATEGORY; ?>
<br /><br />
<?php
}
// New Content Icon
if ( ( $access->canEdit || $access->canEditOwn ) && count( $other_categories ) > 0 ) {
$link = sefRelToAbs( 'index.php?option=com_content&task=new§ionid='. $id .'&Itemid='. $Itemid );
?>
<a href="<?php echo $link; ?>">
<img src="<?php echo $mosConfig_live_site;?>/images/M_images/new.png" width="13" height="14" align="middle" border="0" alt="<?php echo _CMN_NEW;?>" />
<?php echo _CMN_NEW;?>...</a>
<br /><br />
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<?php
// Displays listing of Categories
if ( ( ( count( $other_categories ) > 1 ) || ( count( $other_categories ) < 2 && count( $items ) < 1 ) ) ) {
if ( ( $params->get( 'type' ) == 'category' ) && $params->get( 'other_cat' ) ) {
HTML_content::showCategories( $params, $items, $gid, $other_categories, $catid, $id, $Itemid );
}
if ( ( $params->get( 'type' ) == 'section' ) && $params->get( 'other_cat_section' ) ) {
HTML_content::showCategories( $params, $items, $gid, $other_categories, $catid, $id, $Itemid );
}
}
?>
</td>
</tr>
</table>
In the second part/next table row the items are displayed but now without "colspan=2" and "width=100%". So the table syntax is wrong when there are no item. Furthermore, wouldn´t it be better to put the if block around the whole table row, so if you deselect "Display Items in cat view" in your menu button parameters, now empty table row would be created, as is it done now.
In the third part/ next table row the "colspan=2" reappears without any width and here the same, it would make sense to put the if block (Display listing of categories) around the whole table row, because if the listing of cat items is deselected in the menu parameters it leads to an empty table row.
Hopefully you can correct this simple issues, or is there anything i misunderstood?
Thanks
Ralph