CodeIgniter Forums
template help or check - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: template help or check (/showthread.php?tid=12534)



template help or check - El Forum - 10-22-2008

[eluser]Programming Life[/eluser]
i am trying to make a template using table can anyone see my code
how i can give or set the colspan in this template
please correct this.
---------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;?php
/* $tmpl = array ( 'table_open' => '<table border="1" width=700 height==700 cellpadding="2" cellspacing="1" class="mytable">' );
$this->table->set_template($tmpl);*/
/*



$this->table->set_heading('');
$this->table->add_row($header);
, 'contents');
$this->table->add_row($this->load->view('basic registeration system/footer'));

echo $this->table->generate();
*/ /*

$this->load->view('basic registeration system/content');

*/


$tmpl = array (
'table_open' => '<table border="1" width=750 height=750 cellpadding="4" cellspacing="0">',

'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',

'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',

'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',

'table_close' => '</table>'
);


// echo $tmpl[''];
/*
echo $tmpl['row_start';
echo $tmpl['cell_alt_start']; echo $tmpl['cell_alt_end'];
echo $tmpl['row_end'];

*/


echo $tmpl['table_open'];

echo $tmpl['row_start'];
echo $tmpl['cell_alt_start'];
echo $this->load->view('basic registeration system/header');
echo $tmpl['cell_alt_end'];
echo $tmpl['row_end'];


echo $tmpl['row_start'];
echo $tmpl['cell_alt_start'];
echo $this->load->view('basic registeration system/leftmenu');
echo $tmpl['cell_alt_end'];

echo $tmpl['cell_alt_start'];
echo "contents";
echo $tmpl['cell_alt_end'];
echo $tmpl['row_end'];



echo $tmpl['row_start'];
echo $tmpl['cell_alt_start'];
$this->load->view('basic registeration system/footer');
echo $tmpl['cell_alt_end'];
echo $tmpl['row_end'];



echo $tmpl['table_close'];

//echo $this->table->;

$this->table->set_template($tmpl);

?&gt;


template help or check - El Forum - 10-23-2008

[eluser]steel_slasher[/eluser]
I believe this is the wrong forum for your post


template help or check - El Forum - 10-25-2008

[eluser]Programming Life[/eluser]
i belive you dont reply again to me.


template help or check - El Forum - 10-25-2008

[eluser]Colin Williams[/eluser]
I don't think it'd be responsible to recommend a fix to your table-based layout. It's the 21st century, so I would suggest laying out your page with CSS and keep your markup semantic, not presentational.

Also, there is no clear logic to your code. Follow the recommended use of the Table class in the User Guide. I don't think you've followed it through completely.


template help or check - El Forum - 10-26-2008

[eluser]Programming Life[/eluser]
okay guys
thanks