0

I'm new in using the CodeIgniter and I want to find the view what contain the page's head, because I want to pleace into that my Google Analytics tracking code. I found my base controller, but in the basic controller I found only this:

class Page extends Base_Controller
{

    public function index()
    {
        // Init the Page TagManager

        TagManager_Page::init();
    }

}

Somebody can help me how where can I find that controller and model what loads the view what I want?

3
  • 2
    kindly visit ellislab.com/codeigniter/user-guide/toc.html Commented Dec 27, 2013 at 11:11
  • 1
    Are you sure this is codeigniter? Commented Dec 27, 2013 at 11:24
  • go to application/views/ and find the header there. if there are modules then you need to search them Commented Dec 27, 2013 at 12:16

3 Answers 3

1

Basically what you want is to template your pages. (you need a php which has header,and another which has footer).

You need to follow the userguide by the makers of codeigniter.

http://ellislab.com/codeigniter/user-guide/tutorial/static_pages.html

This above link is how you template it. So in views/templates/header, you can put your analytics.

Sign up to request clarification or add additional context in comments.

Comments

0

you can load the view using this code..

//$this->load->view('viewPageName'); to load file inside application/views/viewPageName


class Page extends Base_Controller
{

  public function index()
  {
    // Init the Page TagManager

    $this->load->view('viewPageName');
  }

}

Comments

0

View is loaded inside the controller function as:

$this->load->view("yourviewname");

Refer to this link for more details: http://ellislab.com/codeigniter/user-guide/general/views.html

6 Comments

But in the controller I found only the code what I posted above.
you made this controller or you got from somewhere?
I only continue the developing of a finished website. What file is executed with that command: TagManager_Page::init(); Where I need to find the file what contain that command?
in that case you need to research a lot.we cannot help you by just seeing this much code.may be its calling some template file.you need to check whole project thoroughly.
I feared from that. :D And can you add some advice how where can I start the finding?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.