# Preview

**URL:** <https://www.ruby-forum.com/t/preview/109797>\
**Category:** Radiant CMS\
**Created:** [July 19, 2007, 3:51am UTC](https://www.ruby-forum.com/t/preview/109797 "2007-07-19T03:51:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry\_Hess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@Barry\_Hess](https://www.ruby-forum.com/u/Barry_Hess)\
**Post date:** [July 19, 2007, 3:51am UTC](https://www.ruby-forum.com/t/preview/109797/1 "2007-07-19T03:51:13Z")

</div>

Another question for you…

I’m starting to get reasonably familiar with Radiant. I’ve written a  
few  
extensions - even front-end ones. I’ve looked into some of the code as  
necessary.

But I’m not super familiar with the user interface since I’m typically  
looking at code rather than configuring the layouts and snippets. Maybe  
I’m  
missing something, but is there a “preview” option for pages? I kind of  
just assumed this was possible - that one could preview a page prior to  
publishing it. For the life of me, I can’t figure out how to do such a  
thing.

If “preview” is not built in, has anyone written something to provide  
this  
functionality?

## Thanks!

Barry Hess  
removed\_email\_address@domain.invalid

> **[Barry Hess :: bjhess.com](https://bjhess.com/)**
>
> Barry Hess writes about software, writing, creativity, media, and family.

---

<div class="post-metadata">

**Author:** ![Barry\_Hess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@Barry\_Hess](https://www.ruby-forum.com/u/Barry_Hess)\
**Post date:** [July 19, 2007, 2:28pm UTC](https://www.ruby-forum.com/t/preview/109797/2 "2007-07-19T14:28:38Z")

</div>

Barry,

I wrote a quick-and-dirty one as a proof-of-concept for the facets  
branch back in January. It’s not too hard, and I bet a lot of the code  
could be ported to 0.6.2. Basically it involves constructing a page and  
its parts in-memory and then calling the process method. Here’s the  
code that gets mixed into the admin/page\_controller:  
[http://dev.radiantcms.org/radiant/browser/branches/facets/extensions/page\_preview/lib/preview\_controller\_extensions.rb](http://dev.radiantcms.org/radiant/browser/branches/facets/extensions/page_preview/lib/preview_controller_extensions.rb)

On the client side, there’s a link that serializes the form and submits  
it to this action in a new window.

Sean

---

<div class="post-metadata">

**Author:** ![Barry\_Hess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@Barry\_Hess](https://www.ruby-forum.com/u/Barry_Hess)\
**Post date:** [July 19, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/preview/109797/3 "2007-07-19T19:11:27Z")

</div>

Thanks, Sean. I have a potential client that wants this functionality.  
At  
least now I can tell them it should be possible, given a little time.

~Barry

On 7/19/07, Sean C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > extensions - even front-end ones. I’ve looked into some of the code as  
> > If “preview” is not built in, has anyone written something to provide  
> > Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
Barry Hess  
removed\_email\_address@domain.invalid

> **[Barry Hess :: bjhess.com](https://bjhess.com/)**
>
> Barry Hess writes about software, writing, creativity, media, and family.

---

<div class="post-metadata">

**Author:** ![Barry\_Hess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@Barry\_Hess](https://www.ruby-forum.com/u/Barry_Hess)\
**Post date:** [December 6, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/preview/109797/4 "2007-12-06T20:52:27Z")

</div>

IIRC even draft pages are being rendered if your hostname begins with  
‘dev.’ , e.g. ‘[dev.xyz.org](http://dev.xyz.org)’ instead of ‘[www.xyz.org](http://www.xyz.org)’. Of course your  
webserver has to be configured accordingly.

Greetings,  
Sascha
