- You will need to add the config to initializer.
- Create the view.
- (re)start your Rails server.
- Override (or better solution) the pages action (see "app/views/refinery/admin/pages/_actions.html.erb" in this gist for an example) or else, add ?view_template=my_content_type to the page's new URL. Ie: http://localhost:3000/refinery/pages/new?view_template=my_content_type
See some screenshots:
http://cl.ly/2W2Z1E342B3c2x1Q1I3t
@jipiboily, I am always pleasantly surprised how people like you are always ready to help. Thanks!
Concerning the code, I'd have to say that I've already posted all my code. I started to work on the new project. And these things we are discussing here (defining layouts, and "yield" parts) are, as I believe, the things that should be done very late, if not first during the development of a project.
I am just trying to get this "2. option" robyurkowski suggested to work. So, as I said before, I've overridden pages_controller and added:
def bidon
render_with_templates?
end
Then I've created "bidon.html.erb" and placed just some silly text I want to be returned in my browser, just to see that its working. I wrote "Hello world" inside h1 tags.
And then I tried to add a route inside routes.rb file (config folder). I tried with "match '/novi-template' => 'pages#bidon'" line.
I'm not sure which part I didn't do right, but I've thought that route was the wrong one. I'm not 100% sure about that. The fact is that I can't get the content I placed in "bidon.html.erb" file, that is "hello world".
Thanks one more time.