Hello,

I have enabled a module to display articles inside 1 to 4 columns depending on how many columns are selected.

Each article in any of the columns will have either squared or rounded corners.

So, for example, column 1 may have articles with rounded corners, column 2 may have articles with squared corners etc.

I have the following code which outputs Joomla articles into 1,2,3 or 4 columns on my page -
PHP Code:
<?php
        
for($i=0$n=0$i<$this->news_amount$i++, $n++)
        {
            if(
$i 0)
            {
                
$row floor($i $this->news_column);
            }
            else
            {
                
$row 0;
            }
            
$column = ($row $this->news_column) + $n;
            
$this->_data[$n][$row] = !empty($news_code_html_tab[$column]) ? $news_code_html_tab[$column] : '';

            if( (
$n+1) == $this->news_column)
            {
                
$n = -1;
            }
        }
    }
    {
        
// Nothing to display
        
if(empty($this->_data))
        {
            throw new 
Exception('There is nothing to display!');
        }
        foreach(
$this->_data as $column => $rows)
        {
            echo 
'
<div id="'
.$this->column_ids[$column].'">';
            
// If this is the center column of a 3-column layout
            
if($column == && $this->news_column == && $this->corners['fixed'])
            {
                
$prefix '
    <div class="gk_round_fixed">
        <div>'
."\n";
                
$suffix '
        </div>
    </div>'
."\n";
            }
            
// If the corners are rounded
            
elseif ($this->corners['rounded'])
            {
                
$prefix '
    <div class="roundedflexable">
        <div>
            <div>
                <div>'
."\n";
                
$suffix '
                </div>
            </div>
        </div>
    </div>'
."\n";
            }
            
// If the corners are squared
            
elseif($this->corners['squared'])
            {
                
$prefix '
    <div class="squared">'
."\n";
                
$suffix '
    </div>'
."\n";
            }
            
// Otherwise...
            
else
            {
                
$prefix $suffix '';
            }
            echo 
$prefix;
            echo 
implode($suffix.$prefix$rows);
            echo 
$suffix;
            echo 
'
</div>'
;
        }
    }
?>
From this code I can choose how many columns are outputted as html (1 to 4) via the module manager in joomla.

The following array of column Id’s is taken from my helper.php file and outputs the actual column Id’s into HTML -
PHP Code:
 var $column_ids = array
 (
        
'column1',
        
'column2',
        
'column3',
        
'column4'
    
); 
Now, this array does not allow for either rounded or squared corners for each column.

So, I would like to use my xml file and helper.php file to enable me to choose rounded or squared corners for each column.

I had hoped for something similar to this in the helper.php file –
PHP Code:
$this->first_module_id $params->get('first_module_id','');
$this->firstrounded $params->get('firstrounded'1); // boolena value - support for rounded corners
$this->firstsquaredcorners $params->get('firstsquaredcorners'1);
    
$this->second_module_id $params->get('second_module_id',''); //('module_second_id','gk_news_show-1');
$this->secondrounded $params->get('secondrounded'1); // boolena value - support for rounded corners
$this->secondsquaredcorners $params->get('secondsquaredcorners'1);
$this->third_module_id $params->get('third_module_id',''); // unique ID
$this->thirdrounded $params->get('thirdrounded'1); // boolena value - support for rounded corners
$this->thirdsquaredcorners $params->get('thirdsquaredcorners'1);
$this->thirdroundedfixed $params->get('thirdroundedfixed'1);
    
$this->fourth_module_id $params->get('fourth_module_id','');
$this->fourthrounded $params->get('fourthrounded'1); // boolena value - support for rounded corners
$this->fourthsquaredcorners $params->get('fourthsquaredcorners'1); 
And so on for the other 2 columns...
And I have this in the XML file to actually select which column width is outputted and which corners are selected for each column –
Code:
<param name="first_module_id" type="list" label="FIRST_MODULE_ID" description="">
<option value="first_module_column_100">first_module_column - 100% width</option>
<option value="first_module_column_50">first_module_column - 50% width </option>
<option value="first_module_column_33">first_module_column - 33% width </option>
<option value="first_module_column_25">first_module_column - 25% width </option>
</param>
<param name="firstrounded" type="radio" label="FIRSTROUNDED" description="">
<option value="0">DISABLED</option>
<option value="1">ENABLED</option>
</param>
<param name="firstsquaredcorners" type="radio" label="FIRSTSQUAREDCORNERS" description="">
<option value="0">DISABLED</option>
<option value="1">ENABLED</option>
</param>
<param type="spacer" />
<param name="second_module_id" type="list" label="second_MODULE_ID" description="">
<option value="second_module_column_50">second_module_column - 50% width </option>
<option value="second_module_column_33">second_module_column - 33% width </option>
<option value="second_module_column_25">second_module_column - 25% width </option>
</param>
<param name="secondrounded" type="radio" label="secondROUNDED" description="">
<option value="0">DISABLED</option>
<option value="1">ENABLED</option>
</param>
<param name="secondsquaredcorners" type="radio" label="secondSQUAREDCORNERS" description="">
<option value="0">DISABLED</option>
<option value="1">ENABLED</option>
</param>
...And so on for the third and fourth columns.
So, instead of having column-1, column-2 etc outputted as in the array mentioned earlier, which has no options of specifying the corner style of each column , I would like to have the column names selected via the XML file plus the option of specifying a corner style.
e.g. a 3 column layout will output this HTML –
Code:
first_module_column_33
firstsquaredcorners
second_module_column_33
secondsquaredcorners
third_module_column_33
thirdroundedcorners
I hope all that makes sense, can anyone help me out with the code?