如何在Joomla中将参数从一个模块发送到另一个模块


how to send parameters from one module to another module in joomla

我所做的是我刚刚在我的joomla网站中安装了flexi自定义代码模块以使用php,我创建了一个新数据库而不是joomla数据库,我将代码放在下面,它已连接并给出了结果。

$rows = $result->num_rows;    // Find total rows returned by database
if($rows > 0) {
    $cols = 3;    // Define number of columns
    $counter = 1;     // Counter used to identify if we need to start or end a row
    $nbsp = $cols - ($rows % $cols);    // Calculate the number of blank columns
    $container_class = 'container-fluid';  // Parent container class name
    $row_class = 'row';    // Row class name
    $col_class = 'col-sm-4'; // Column class name
    echo '<div class="'.$container_class.'">';    // Container open
    while ($item = $result->fetch_array()) {
        if(($counter % $cols) == 1) {    // Check if it's new row
            echo '<div class="'.$row_class.'">';    // Start a new row
        }
                     $jid=$item['jid'];
                $jdesc = $item['jdesc'];
                    $duration=$item['duration'];
                     $jobtitle=$item['jobtitle'];
echo ('<div class="'.$col_class.'">'.'<h3>'.'<a href="showjob?jid=' . $jid .    '  ">' .$jobtitle . '</a>' .'</br>'.$jdesc.'<br/>'.$duration.'</h3>'.'<h5>'.$item['name'].'</h5></div>');
if(($counter % $cols) == 0) { // If it's last column in each row then counter remainder will be zero
            echo '</div>';   //  Close the row
        }
        $counter++;    // Increase the counter
    }
    $result->free();
    if($nbsp > 0) { // Adjustment to add unused column in last row if they exist
        for ($i = 0; $i < $nbsp; $i++)  { 
            echo '<div class="'.$col_class.'">&nbsp;</div>';        
        }
        echo '</div>';  // Close the row
    }
    echo '</div>';  // Close the container
}
?>
<?php
$conn->close();
?>

它是创建的数据库连接,也给出了结果,但是有了这个结果,我想将参数发送到其他模块以显示结果,如何将参数从一个模块发送到另一个模块,最后,我想在单击链接时将id值放入另一个模块中

我解决了这个问题,问题是我们正在发送到另一个页面的链接正在保存缓存,所以我刚刚安装了缓存管理器插件并添加了特定的页面,不想保存 cache.so 问题解决了,现在我可以轻松地从另一个模块将任何参数发送到 joomla 模块。