Welcome Guest, Not a member yet? Register   Sign In
Changing View's Dir
#1

[eluser]walrus_lt[/eluser]
Hello, i want to add feature wich allows to use different views depending of selected template.

I't should look like this:

views/DarkShades/index.php
views/DarkShades/forum.php
views/Wap/index.php
views/Wap/forum.php


Doe's codeigniter allow change views dir, easily? And how? Smile
#2

[eluser]xwero[/eluser]
Code:
$this->load->view($theme.'/index.php');
#3

[eluser]walrus_lt[/eluser]
IT's only the way? Smile Seems that i will need write my own code :cheese:
#4

[eluser]xwero[/eluser]
I don't see why you need to write your own code? It's just a directory that needs to be added in front of the view file. You can add the directory to the config or to the session.
#5

[eluser]walrus_lt[/eluser]
It would be more portable. But you'r right Smile
#6

[eluser]jaswinder_rana[/eluser]
Sorry to hack this thread but how will I store different CSS and JS files?
#7

[eluser]garrettheel[/eluser]
css and js files should be stored in the webroot anyway, not the view directories
#8

[eluser]jaswinder_rana[/eluser]
Thanks.

I do understand and that's the problem. If I have different themes for views then it means I need to crate similar directory structure for each theme's CSS and JS?

Views is in system and has been organized with directory structure for themes.

assets are in public_html and has to have similar directory structure for each theme, right?

I was hoping to avoid that if there is another solution but it seems not.




Theme © iAndrew 2016 - Forum software by © MyBB