CodeIgniter Forums
limitations with framework - 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: limitations with framework (/showthread.php?tid=43557)



limitations with framework - El Forum - 07-15-2011

[eluser]Mainboard[/eluser]
I'm notices that is impossible try to call or load the url for each local view from the database unless that you create some function in your controll to determine what view load based on the URL from database. In this case i was talking about to dynamic menu from database. In natural languaje is more easy because i can write this
Code:
require_once('connection/db.php');
    $consulta = "select * from menu_enc where ref_submenu='1'";    
    $result=mssql_query($consulta);                
    while($row=mssql_fetch_array($result))
    {            
        $link=$row["link"];            
        $codigo_grupo_det=$row["det_codigo_grupo_det"];        
        if ($link=="NA")
        {
            echo '<div class="menutitle"><B>'.$row["det_nombre_rol"].'</B></div>';
        }    
        else //si tiene link en el campo link, entonces al dar clic sobre la opcion lo ejecutará
        {
            echo '<div class="menutitle"><a href="'.$row[" target="'.$row[">'.$row["title"].'</a></div>';   }

and automatically capture the view, if exist some method to call my local views from the database using MVC please tell me because i searched like crazy and i didn't find anything solution


limitations with framework - El Forum - 07-16-2011

[eluser]WanWizard[/eluser]
Read up on base controllers.

You can use them if you need the same code executed for every controller you call.