Joomla.it Forum
Joomla! 1.0.x (versione con supporto terminato) => Le voci di Joomla.it (solo per versione Joomla 1.0.x) => : medmax 04 Jul 2008, 10:59:55
-
Ciao a tutti,
ho un problema e non so come uscirne...
Voglio dividere l'elenco dei download di docman su due colonne invece di una...
il codice da modificare è nel file list.tpl.php, ho provato varie cose, ma non sono riuscito a care un ragno dal buco...
Allego anche il codice:
<?php
if(count($this->items)) { ?>
<div id="dm_docs">
<h3><?php echo //_DML_TPL_DOCS;?><span><?php echo _DML_TPL_DATEADDED;?></span></h3>
<?php
/*
* Include the documents list ordering template
*/
?>
<?php //include $this->loadTemplate('documents/list_order.tpl.php'); ?>
<?php /*<dl >*/?>
<?php
/*
* Include the list_item template and pass the item to it
*/
foreach($this->items as $item) :
$this->doc = &$item; //add item to template variables
include $this->loadTemplate('documents/list_item.tpl.php');
endforeach;
?>
<?php /*</dl >*/?>
</div>
<?php } else { ?>
<br />
<div id="dm_docs">
<i><?php echo _DML_TPL_NO_DOCS ?></i>
</div>
<?php } ?>
Come posso fare?
Grazie
-
ok, ho combinato...
posto il codice nel caso qualcuno abbia la mia stessa esigenza...
Basta sostituire questa parte di codice:
foreach($this->items as $item) :
$this->doc = &$item; //add item to template variables
include $this->loadTemplate('documents/list_item.tpl.php');
endforeach;
con questo codice
$contatore = 0;
echo '<table><tr>';
foreach($this->items as $item) :
$this->doc = $item; //add item to template variables
if ($contatore <2) {
echo '<td>';
include $this->loadTemplate('documents/list_item.tpl.php');
echo '</td>';
$contatore++;
} else {
echo '</tr><tr>';
echo '<td>';
include $this->loadTemplate('documents/list_item.tpl.php');
echo '</td>';
$contatore = 1;
}
endforeach;
echo '</table>';
Ciao