Welcome Guest, Not a member yet? Register   Sign In
common views
#1

[eluser]quals_jack[/eluser]
HI, all

I have some subfolders under applications folder. And use index.php to set application path to access different applications subfolder. On this case how do I access ,$this->load->view(), some common views saved in applications/views? Such as the following...

common views are saved in
applications/views

specific app views are saved in
applications/app1/views

applicariotn path is set as
applications/app1/

Thank you in advance!
Jack
#2

[eluser]Randy Casburn[/eluser]
Good question. The answer is to just add the folder name in front of the view name. Here is the quote from the documetnation page:
Quote:Storing Views within Sub-folders

Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need to include the folder name loading the view. Example:
$this->load->view('folder_name/file_name');


and that page can be found here http://ellislab.com/codeigniter/user-gui...views.html. The text above is about half way down.

Randy
#3

[eluser]quals_jack[/eluser]
Thank you Randy
I know how to set up and use subfolder under view folder. My problem is quite silly. I would like to load the view I save in application/views and my normal views are save in application/app1/views which have no peoblems. And some special views are save in application/app1/views/zz which I can load with subfolder as you mention about has no problem. But if I want to load a view somewhere else, such as in application/view, is that possible? Thank you again!


jack
#4

[eluser]Randy Casburn[/eluser]
@quals_jack -- regretting the completely obvious question here - since you know that you can do everything else I've suggested...

Have you tried it? :blank:

Randy
#5

[eluser]quals_jack[/eluser]
I used subfolder to save different category of views. It works fine. While my question is I want to load a view not either in view folder or subfolder of views. Is that possible?


jack
#6

[eluser]Randy Casburn[/eluser]
Please try it!



[ edited this to be more direct -- that's above this line ]
uuummmm.... I'm confused.

@quals_jack—repeating the completely obvious question here - since you know that you can do everything else I’ve suggested…

Have you tried it? blank stare

Randy




Theme © iAndrew 2016 - Forum software by © MyBB