Welcome Guest, Not a member yet? Register   Sign In
Passing controller object into view (Is this bad?)
#3

[eluser]blasto333[/eluser]
My view is kind of complicated, it just seems to make more sense to only pass in a couple of things.


Here is a simplified version of my view.

Code:
<?php $this->load->view("partial/header"); ?>
<div id="title_bar">
    <div id="title" class="float_left">&lt;?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_customers'); ?&gt;</div>
    <div id="new_button" class="float_right">
        &lt;?php echo anchor("$controller_name/view/-1/width:".$controller->_get_form_width().'/height:'.$controller->_get_form_height(),
        "<div class='big_button'><span>".$this->lang->line($controller_name.'_new')."</span></div>",
        array('class'=>'thickbox none','title'=>$this->lang->line($controller_name.'_new')));
        ?&gt;
    </div>
</div>
<div id="feedback_bar"></div>
<div id="table_action_header">
    <ul>
        <li class="float_left"><span>&lt;?php echo anchor("$controller_name/delete",$this->lang->line("common_delete"),array('id'=>'delete')); ?&gt;</a></span></li>
        <li class="float_left"><span><a href="#" id="email">&lt;?php echo $this->lang->line("common_email");?&gt;</a></span></li>
        <li class="float_right">
        <img src='&lt;?php echo base_url()?&gt;images/spinner_small.gif' alt='spinner' id='spinner' />
        &lt;?php echo form_open("$controller_name/search",array('id'=>'search_form')); ?&gt;
        &lt;input type="text" name ='search' id='search'/&gt;
        &lt;/form&gt;
        </li>
    </ul>
</div>
<div id="table_holder">
&lt;?php echo $manage_table; ?&gt;
</div>
&lt;?php $this->load->view("partial/footer"); ?&gt;


Messages In This Thread
Passing controller object into view (Is this bad?) - by El Forum - 10-17-2008, 10:57 PM
Passing controller object into view (Is this bad?) - by El Forum - 10-18-2008, 01:27 AM
Passing controller object into view (Is this bad?) - by El Forum - 10-18-2008, 06:22 AM
Passing controller object into view (Is this bad?) - by El Forum - 10-18-2008, 09:38 AM
Passing controller object into view (Is this bad?) - by El Forum - 10-18-2008, 09:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB