SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CodeIgniter

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    194
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    CodeIgniter

    Is this forum also for codeigniter questions or just straight PHP ( no framework )?

  2. #2
    SitePoint Addict bronze trophy
    Join Date
    Apr 2013
    Location
    Ithaca
    Posts
    351
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by sessions View Post
    Is this forum also for codeigniter questions or just straight PHP ( no framework )?
    I guess u are allows to ask anything related to PHP, frameworks or not.

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    194
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    yeah, I just don't recall many CI questions...

    anyway

    I am using a default layout, then nesting the view I need for a particular page. A stripped down simple example:

    Code HTML4Strict:
     <!DOCTYPE html>
        <head>
     
        </head>
        <body>
            <div id="mainContent" class="pure-u">
                    <?php
         $this->load->view($viewToLoad);
        ?>
            </div>
       </body>
    </html>

    Where $viewToLoad will be the name of the nested view to load.

    My issue is I have navigation in the default layout that is the same for every page of the site. The nav items are queried from a db.

    So I thought since the nav data will be the same for every page on the site, that I should gather the data in CI_Controller…correct?

    But right now the issue is calling this: $this->load->model(“Model”); from inside CI_Controller doesn’t find the model, so I can’t get the data.

    If this is the correct approach, how do I get data returned to CI_Controller?

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •