I need to make site views changeable
I found how to change layouts but it is not enough, becouse templates
can use different ways to display and organize content.
I found one way to do this, but i need to make subfolders in my
‘view/layouts’, ‘view/controller_name’ both and to create additional
subfolder somewhere in ‘public’ to put there tepmlate images, styles, js
etc.
Is there any options to tell rails to look for views in the other
places, not in ‘app/view’ ?
the problem is not in place for images
i just want to have all files related to some template in one folder
maximum 2 folders
1 - for views and layouts
2 - public folder for images and other browsable things
in php whith smarty it would be something like that
$smarty->templates_dir = “/path/to/my/templates”
so
$smarty->display(“index.tpl”)
will render
/path/to/my/templates/index.tpl
but rails somehow knows that all views are in /rails/app/view
is it passible to change this path inside the controller dinamicly ?
the problem is not in place for images
i just want to have all files related to some template in one folder
maximum 2 folders
1 - for views and layouts
2 - public folder for images and other browsable things
in php whith smarty it would be something like that
$smarty->templates_dir = “/path/to/my/templates”
so
$smarty->display(“index.tpl”)
will render
/path/to/my/templates/index.tpl
but rails somehow knows that all views are in /rails/app/view
is it passible to change this path inside the controller dinamicly ?
But do not be tempted to put everything (templates, images) in one
place. It is a very bad decission. Rather get used to current setup.
Remember, that generated html code should be strictly semantical and
site look should be defined by CSS. In that sense html is completly
unrelated to visual effect (see http://csszengarden.com for examples).
Cheers,
Åukasz
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.