[Masterview-devel] MasterView generation from existing rhtml

Jeff Barczewski
Mon, 26 Jun 2006 05:22:24 -0000

Sergey,

I haven''t come up with a way to take existing rhtml and create xhtml
from
them. However you can co-exist with existing rhtml nicely. You can have some
thing in masterview templates and other things in simple rhtml and use both
interchangeably in your project.

If you want to view the generated rhtml files simply to see what masterview
is generating behind the scenes then simply do rake mv:view_rhtml
RHTML=store/list.html and it will output to stdout.

If you want to generate the files to the filesystem so that they will be
loaded from there then you can change the  setting in
config/masterview/setting.rb like so
config.generate_rhtml_files = true
When this setting is set it will generate rhtml to the file system and it
will be loaded from there just like your existing rhtml.

Refreshing the browser will reparse the template (and regenerate the rhtml).

You can also kick off rhtml generation from the command line using rake
mv:parse

Let me know if this all makes sense and answers your questions.

All the best,

Jeff


On 6/25/06, Sergey Shalatskiy <sshalatskiy at guerillaviralmarketing.com>
wrote:
>
>  Hi Jeff,
>
> MasterView is excellent! Just a couple of questions:
>
> Is it possible to generate (x)html from existing rhtml etc. ?
> It is very important if someone wants to switch to masteview from regular
> rails apps.
> Possibly, it would be also convenient to have an option to use existing
> files without regeneration, as you mentioned in one of your messages on
> forum.
> Also, I was not able to generate rhtml files from masterview templates.
> How do I do that? It looks like in order to smoothly upgrade existing
> projects,
> we need roundtrip options. It will help a lot to understand the framework
> better and switch to MasterView quickly. Complex applications will require
a
> lot of manual
> work if there is no such options.
>
> Thanks
>
> Sergey Shalatskiy
>
-------------- next part --------------
An HTML attachment was scrubbed...