[Radiant] RFC: Alias Behavior

Sean Cribbs seancribbs at gmail.com
Thu Dec 28 09:03:52 CST 2006


Looks interesting, Brian.  I know I'm wasn't good in the past about this
myself, but some tests would be nice.

Sean Cribbs
seancribbs.com

On 12/28/06, Brian Gernhardt <benji at silverinsanity.com> wrote:
>
> I just hacked together a dirt-simple "alias" behavior.  This came out
> of a desire to have a second domain serve up a portion of the main
> site (using the Virtual Domain Behavior).  All it does is take the
> "source" page part and use that to find (by slug) another page to
> use.  It allows children of the original page to be overridden by
> children of the alias page.
>
> http://silverinsanity.com/~benji/radiant/alias_behavior.rb
>
> To use it, just place the above file in RAILS_ROOT/app/behaviors
>
> As a note, "find_page_by_path" seems like it would be generically
> useful, especially in environments where the page URLs are very
> different from the page slugs.  (Along with <r:if_page path=""> and
> <r:unless_page>, which would check to see if the current page matches
> a slug path.  I'll write those up when/if I need them.)
>
> If anyone has any questions or comments, feel free to let me know.
> If you spot any glaring errors, PLEASE let me know.  I'd like to have
> people more familiar with Radiant's core take a peek at it before
> trying to use it in a production environment.
>
> (BTW, is mental stable enough for production use and is there an easy
> migration path from 0.5.2 yet?)
>
> Thanks,
> ~~ Brian
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20061228/a330f4c5/attachment.html


More information about the Radiant mailing list