# User websites with templates

**URL:** <https://www.ruby-forum.com/t/user-websites-with-templates/96284>\
**Category:** Rails\
**Created:** [June 27, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/user-websites-with-templates/96284 "2006-06-27T23:04:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapnap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@chapnap](https://www.ruby-forum.com/u/chapnap)\
**Post date:** [June 27, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/user-websites-with-templates/96284/1 "2006-06-27T23:04:00Z")

</div>

Hi, I’m very new to Rails and have a general question.

What technique would you use to allow users who have a uniform set of  
data to create very un-uniform websites from that data?

One set of data, many different website/output possibilities.

It would have to go beyond CSS. I’m assuming there will potentially be  
some level of scripting involved for each template. The goal is to  
create a framework that will allow for nearly any design/functionality  
going forward.

Any advice? TIA.

---

<div class="post-metadata">

**Author:** ![chapnap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@chapnap](https://www.ruby-forum.com/u/chapnap)\
**Post date:** [June 28, 2006, 4:11pm UTC](https://www.ruby-forum.com/t/user-websites-with-templates/96284/2 "2006-06-28T16:11:58Z")

</div>

Two suggestions:

1. Engines
2. MasterView template engine

Engines allow you to have a base set of code and views and to override  
just  
what you need to for each client. [http://rails-engines.org/](http://rails-engines.org/) Obviously  
you  
can symlink or use svn to link the base code and views together if in  
different apps.

MasterView template engine which is the project I am working on, allows  
you  
to use html templates with the erb logic embedded in attributes so one  
can  
work with it in a WYSIWYG editor. The part of this that would allow for  
extended reuse is how the attribute directives are created. Custom  
directives can be created to implement boiler plate code around things  
like  
tables and such. So if you need to do things in addition to simple CSS,  
writing your own directives for MasterView would be one way to ensure  
consistency. (Caveot: We are currently in the process of simplifying the  
directive api to make it easier to use and understand so the internals  
of  
that may change over the next several weeks). [http://masterview.org/](http://masterview.org/)

So two different ways to approach things. Depending on what you are  
wanting  
to do, one may be better than the other.

Let me know if I can help you further.

Jeff

---

<div class="post-metadata">

**Author:** ![chapnap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@chapnap](https://www.ruby-forum.com/u/chapnap)\
**Post date:** [June 28, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/user-websites-with-templates/96284/3 "2006-06-28T16:58:23Z")

</div>

Jeff B. wrote:

> Two suggestions:
> 
> 1. Engines
> 2. MasterView template engine
> 
> Engines allow you to have a base set of code and views and to override  
> just  
> what you need to for each client. [http://rails-engines.org/](http://rails-engines.org/) Obviously  
> you  
> can symlink or use svn to link the base code and views together if in  
> different apps.
> 
> MasterView template engine which is the project I am working on, allows  
> you  
> to use html templates with the erb logic embedded in attributes so one  
> can  
> work with it in a WYSIWYG editor. The part of this that would allow for  
> extended reuse is how the attribute directives are created. Custom  
> directives can be created to implement boiler plate code around things  
> like  
> tables and such. So if you need to do things in addition to simple CSS,  
> writing your own directives for MasterView would be one way to ensure  
> consistency. (Caveot: We are currently in the process of simplifying the  
> directive api to make it easier to use and understand so the internals  
> of  
> that may change over the next several weeks). [http://masterview.org/](http://masterview.org/)
> 
> So two different ways to approach things. Depending on what you are  
> wanting  
> to do, one may be better than the other.
> 
> Let me know if I can help you further.
> 
> Jeff

Hi Jeff-  
Our web designer had cranked out our website (with all static contents  
for privacy, faq etc) with dreamweaver. He had used dreamweaver template  
for designing the website. Now I am in the processs of taking that  
design and apply it to the application (dynamic content).What is the  
best way to do it? Does the masterview help with it?  
thanks/thila

---

<div class="post-metadata">

**Author:** ![chapnap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@chapnap](https://www.ruby-forum.com/u/chapnap)\
**Post date:** [June 28, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/user-websites-with-templates/96284/4 "2006-06-28T20:14:04Z")

</div>

Yes, that is one of the things that MasterView would help with. You can  
start from a pure html prototype and add in MasterView attributes to  
make it  
dynamic. And you can go back into dreamweaver or other editor and  
re-edit it  
at any point in the development lifecycle.

So it makes it great for designers to be able to create prototypes and  
developers just sprinkle the prototype with some attributes to make it  
dynamic. And the designer can go back in later and tweak things if need  
be  
too.

Plus you don’t have to give up any of the nice rails functionality  
(layouts,  
partials, helpers, etc), MasterView keeps all the power of rails that  
you  
have with erb (rhtml) since it uses rhtml under the covers.

I will be putting together a demonstration video about how to start from  
a  
prototype very soon. Right now the demos show starting from scratch  
using a  
generator. There is documentation for the attributes so you can get  
started,  
but I just don’t have any example videos ready yet.

Best,

Jeff
