Como o outro tópico falava do CI 6 achei melhor abrir um específico. Segue abaixo um pedaço de código exemplo retirado de um tutorial do site Kohana. É uma view (footer.php) A primeira vista, para mim olhar uma view no CI é muito mais limpo do que o exemplo abaixo. Não se diz que view deve conter o mínimo (ou nenhum) código ? Aqui parece que vão no sentido inverso... > |<?php > > $no_edit = array <http://www.php.net/array>("add", "edit", "details"); > > /* Set this page for the login redirections */ > if ($this->uri->segment(1) != "user" and !in_array > <http://www.php.net/in_array>($this->uri->segment(1), $no_edit)) > { > $this_page = $_SERVER["REQUEST_URI"]; > $this->session->set(array > <http://www.php.net/array>("last_page" => $this_page)); > } > if ($this->session->get("loggedin") and !in_array > <http://www.php.net/in_array>($this->uri->segment(1), $no_edit)) > echo <http://www.php.net/echo> > html::anchor((($this->uri->rsegment(1) != '') ? > $this->uri->rsegment(1) : 'page') . '/edit/' . $this->uri->segment(1) > . (($this->uri->segment(2) !== false) ? ('/' . $this->uri->segment(2)) > : ''), 'Edit this page'); > > ?> > </div> > <div id="footer"> > <p>© Copyright 2007 Kohana</p> > </div> > > <?php if > (!$this->session->get("loggedin")):?><h3><?=html::anchor("user/login", > "LOGIN")?><?php endif; ?> > <?php if > ($this->session->get("loggedin")):?><h3><?=html::anchor("user/logout", > "Logout")?></h3> > <h3><?=html::anchor("page/list_pages", "Page > Administration")?></h3><?php endif; ?> > </body> > </html>|
Abs -- Muita sorte para nós! Marco Telles ############# # Pier de Ipanema ( http://www.pierdeipanema.com.br/ ) # CodeIgniter PHP framework ( http://www.codeigniter.com.br/ ) # Ubuntu The power of free software ( http://www.ubuntu-br.org/ ) # Python Programming Language ( http://www.pythonbrasil.com.br/ ) _______________________________________________ Lista mailing list [email protected] http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br

