# Remote Layout

**URL:** <https://www.ruby-forum.com/t/remote-layout/190779>\
**Category:** Rails\
**Created:** [June 27, 2010, 6:54pm UTC](https://www.ruby-forum.com/t/remote-layout/190779 "2010-06-27T18:54:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 27, 2010, 6:54pm UTC](https://www.ruby-forum.com/t/remote-layout/190779/1 "2010-06-27T18:54:07Z")

</div>

I have a wild idea that it might be nice to be able to host a layout  
on one or more foreign hosts. That way each host could then use their  
own layout to provide navigation and configure CSS stylings applicable  
to the underlying content. It remotely resembles something like  
frames.

Generally, whenever I have a wild idea like this it’s best for me to  
take 2 aspirin and go lie down a while until it passes. Sometimes it  
can mean that I’m taking the wrong approach and the objective can  
better be handled some other way.

So, my questions run along these lines: 1) Does this idea seem to  
have any merit? 2) Are there better ways to skin this cat? 3) Has  
anyone done anything like this; and, if so can you please give me any  
implementation details that I should know.

TIA.

```
      ... doug
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 27, 2010, 7:17pm UTC](https://www.ruby-forum.com/t/remote-layout/190779/2 "2010-06-27T19:17:28Z")

</div>

Doug J. wrote:

> I have a wild idea that it might be nice to be able to host a layout  
> on one or more foreign hosts. That way each host could then use their  
> own layout to provide navigation and configure CSS stylings applicable  
> to the underlying content. It remotely resembles something like  
> frames.

This doesn’t sound like a good idea from what I can tell, but your  
explanation isn’t so clear that I have any certainty that I know what  
you mean. Please elaborate.

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 27, 2010, 8:40pm UTC](https://www.ruby-forum.com/t/remote-layout/190779/3 "2010-06-27T20:40:06Z")

</div>

> Please elaborate.

I was thinking of a given web page as being composed of 2 parts: (1)  
The substantive content; and, (2) a wrapper (the layout) which  
surrounds the substantive content and provides (among other things)  
the navigation and a style sheet affecting the styling of the  
substantive content. Now suppose that other web sites exist that  
would like to include the substantive content on their site by linking  
to it; but, these sites would like to have the substantive content  
included within their own wrapper (layout) so that they could control  
the navigation and stylings. I was then thinking that suppose that  
these other web sites could post a layout on their site and then pass  
a reference to the URL to that layout as a parameter to the link to  
the substantive content. In such a case, that layout would then be  
used instead of the default layout on the site that hosts the  
substantive content. Is that any more clear?

I know that it’s wild. I just wanted to see how wild and see if  
anyone else had been crazy enough to think about such a thing.

Thanks for the input.

```
      ... doug
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 27, 2010, 10:01pm UTC](https://www.ruby-forum.com/t/remote-layout/190779/4 "2010-06-27T22:01:28Z")

</div>

By way of clarification, please allow me to make one additional point.

Another way of accomplishing what I’m trying to accomplish would be  
through the use of an inline frame. That might well be the best way  
to skin this cat. I just have this thing about frames (ugh). I was  
hoping that I might be able to come up with something a bit more  
clever. Maybe not. Thanks.

```
      ... doug
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 28, 2010, 12:26am UTC](https://www.ruby-forum.com/t/remote-layout/190779/5 "2010-06-28T00:26:03Z")

</div>

On Sun, Jun 27, 2010 at 11:38 AM, doug [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I was thinking of a given web page as being composed of 2 parts: (1)  
> The substantive content; and, (2) a wrapper (the layout) which  
> surrounds the substantive content and provides (among other things)  
> the navigation and a style sheet affecting the styling of the  
> substantive content. Now suppose that other web sites exist that  
> would like to include the substantive content on their site by linking  
> to it; but, these sites would like to have the substantive content  
> included within their own wrapper (layout) so that they could control  
> the navigation and stylings.

Overall, I think it would be both easier and more effective for such  
sites to just retrieve the substantive content through a web service  
interface and embed it into their own layout.

But what the hey – develop a prototype and send it out to play 🙂

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [June 28, 2010, 1:21am UTC](https://www.ruby-forum.com/t/remote-layout/190779/6 "2010-06-28T01:21:39Z")

</div>

> Overall, I think it would be both easier and more effective for such  
> sites to just retrieve the substantive content through a web service  
> interface and embed it into their own layout.

For substantive content that is static I would definitely agree with  
you. However, the substantive content that I am referring to is  
interactive. It would be much easier for others to just link to it.  
I’m just trying to offer an easy way for them to sort of brand it as  
their own. It would be ideal if they could have their own layout.  
I’m just not real sure how practical that is.

> But what the hey – develop a prototype and send it out to play 🙂

I’m thinking about it. It is, however, helpful to know whether others  
think that I’m totally nuts before I invest a lot of time in it.  
Thanks for the input.

```
      ... doug
```
