Welcome Guest, Not a member yet? Register   Sign In
How to get the file name of the view being displayed?
#11

[eluser]Circuitbomb[/eluser]
Tracking down the view being used should be as easy as looking in the controller loading it.

Code:
$this->load->view('viewfilename', $passedvars);
#12

[eluser]callumd[/eluser]
Thanks anyway guys, I guess I'm just used to non-framework debugging methods where stuff like this is explicitly declared some place obvious.
#13

[eluser]Circuitbomb[/eluser]
Sorry I just don't see why you couldn't use the URL logic to track down what view was being used, or if the page has a name or title, the view could be similarly called that.

The obvious place to look for a view being loaded is in the controller and/or method loading it, thats where they should be declared.

If there is routing or url rewriting going on you could just disable that stuff to see the urls for what they are, alternatively you could also determine what is being displayed on the page(or what is supposed to be), then go through each view file and look at the code.

You could probably rename the index.html file in the view folder, then set your htconf settings to allow for directory traversal, then type the url path to the view folder http://mysite.com/system/application/views to get a file list of links to click on.




Theme © iAndrew 2016 - Forum software by © MyBB