# Page Parts as Model (behavior) Attributes, Inheritance

**URL:** <https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956>\
**Category:** Radiant CMS\
**Created:** [July 3, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956 "2006-07-03T19:39:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 3, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956/1 "2006-07-03T19:39:29Z")

</div>

Imagine for a moment adding a pluralized page called “Recipes” of  
fictitious behavior “Model.”

Inside of a Model the “Parts” are attributes for each instance (child-  
page)  
\* part: ingredients  
\* part: serving-size  
\* part: notes

Other examples:  
\* Customers page-model with parts name, telephone, address  
\* Products page-model with parts name, price, description  
\* Maps page-model with name, image (could this be an avenue for  
assets?), comments (versioned/appendable)

Notes  
\* When a child is created, it inherits parents blank parts upon  
creation  
\* The Model behavior can optionally change the layout of parts to  
appear as sequential fields  
\* Each part may have additional functionality, eg: rails-style  
validations

Thoughts?

* * *

Caylan

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 4, 2006, 3:51am UTC](https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956/2 "2006-07-04T03:51:26Z")

</div>

Caylan Van L. wrote:

> ```
> * Products page-model with parts name, price, description
> 
> ```
> 
> Thoughts?

I am interested in some kind of generic model approach, but I think it’s  
outside the scope of what I am trying to do with Radiant right now.

Here’s another thread where someone suggested the same thing:  
[http://www.ruby-forum.com/topic/68469#87834](http://www.ruby-forum.com/topic/68469#87834)

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 4, 2006, 4:18am UTC](https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956/3 "2006-07-04T04:18:32Z")

</div>

> Imagine for a moment adding a pluralized page called “Recipes” of  
> fictitious behavior “Model.”  
> The Model behavior can optionally change the layout of parts to appear  
> as sequential fields  
> Each part may have additional functionality, eg: rails-style  
> validations

This is somewhat what I’m trying to do here:  
[http://soxbox.no-ip.org/radiant/](http://soxbox.no-ip.org/radiant/) - though I was going down the path that  
the model of the page itself was changable, rather than the individual  
parts. Which makes sense for introducing new interfaces for pages that  
aren’t really ‘parted’ - things like redirection pages and such. I’ve  
got most of how to implement it in my head, and a some movements towards  
it in my svn repository, but my employer just put me into a new project  
that’s taking up a lot of my thinking time at the moment, so I’m  
struggling to weigh up the decisions of some of the key interface  
problems.

Placing different behaviours and models onto page parts is a really  
interesting idea. Having a page made up of many structured parts, with  
the ability to inherit those parts, is definitely something that I’ll be  
thinking about… though I’m struggling to think of the use-cases at the  
moment that aren’t covered by being able to change the model of the  
page… maybe as an avenue for introducing multiple behaviors into a  
page (a recipe model behavior combined with a comments behavior without  
having the create a CommentableRecipe behavior).

Dan.

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 5, 2006, 3:23pm UTC](https://www.ruby-forum.com/t/page-parts-as-model-behavior-attributes-inheritance/96956/4 "2006-07-05T15:23:22Z")

</div>

John,

Where did the wiki page go that showed each point release goals?

Can you activate trac captchas to prevent spam abuse?

ï¿¼Ref: [http://dev.radiantcms.org/radiant/ticket/34](http://dev.radiantcms.org/radiant/ticket/34)

* * *

Caylan
