# Where to contribute my ambitious change

**URL:** <https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931>\
**Category:** Radiant CMS\
**Created:** [October 19, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931 "2006-10-19T23:39:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [October 19, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931/1 "2006-10-19T23:39:33Z")

</div>

Hey Everybody,

I have a

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [October 20, 2006, 12:23am UTC](https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931/2 "2006-10-20T00:23:33Z")

</div>

Oops, I accidentally hit return while editing the subject.

Anyway this post has 2 purposes:

1. To explain what I want to do with Radiant, and to see if anybody else  
has ever tried. And to validate that my approach is correct.

2. To ask where/how it might most be useful to contribute what I plan on  
doing back into the core

The details:

I want to implement Page types. From an interface perspective, I’m  
imagining you’ll see a little pop-up when you click “add child” in the  
pages admin asking you what type of page you want to make.

I propose to implement each page type as a database table with a one to  
one relationship back to the pages table. We will assume that somehow  
we know about all tables that have this property and thus know that they  
are page types. I want to implement it so that anybody can create any  
arbitrary page type with very little work. (basically just create the  
database table) In my examples I will use the following example type:

students  
name - short string  
grade - number  
birthday - date  
description - text  
page\_id - (one to one relation back to pages)

So for the purposes of this example you click “add child” in the pages  
admin you would be prompted to chose “standard page” or “student”

Next, what do you see:

If you chose “student” you would see an addional tab after your page  
parts called “Attributes” If you clicked this tab you would see a  
scaffolding-esque form for filling out all of the columns in the  
students table (you would then proceed to fill these out). In the body  
of your page (or in my case in the layout I select for my page) there  
will be additional r:tags for displaying the content-type specific  
attributes. \<r:content attribute=“birthday” /\> for example.

Once I have this working, I’d like “text” attributes to appear in  
seperate tabs with a WYSIWYG (remember they will not actually be page  
parts, they are still stored as attributes of the content type) I am  
also thinking about supporting file uploads in a similar manner.

Once I have that working, I’d like to add a new user type (called  
content admin) who can only create and edit pages that are of a  
non-standard type. (all other actions in the admin would be greyed out)

Finally, I’d like to support linking to other special page types via  
content types. So for instance:

students  
name - short string  
grade - number  
birthday - date  
description - text  
page\_id - (one to one relation back to pages)  
school\_id - (foreign key to schools table)

schools  
page\_id - (one to one relation back to pages)  
etc…

This way, when you create a student you can select which school they are  
in from a drop down showing all other school-typed pages.

Remember, the idea here is not to add students and schools, but the  
ability for me to simply create those tables (and maybe their models) in  
a particular instance of radiant and have the core of the application  
recognize them as page types and allow me to manipulate then in the  
admin

I want to be able to customize radiant with content types for a  
particular purpose and then hand it off to a more non-technical users.  
I eliminate the need for that user to know any radiant tags by creating  
a layout for each content item type (which would pull all of the  
relevant stuff from the attributes they populate)

Any comments?

Should I work from corex or mental? Does it sound like what I am trying  
to do might be broken by the currently planned roadmap for the next  
release of radiant?

Can you explain to me how (If possible) I might develop the entirety of  
the functionality I just described as a “plug-in”?

thanks,  
Jacob

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [October 20, 2006, 12:35am UTC](https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931/3 "2006-10-20T00:35:56Z")

</div>

You should check out Hieraki. It does exactly what your describing.  
Unfortunately Tobias and I can no longer support the project but it is  
in a very usable state.

On 10/19/06, Jacob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> arbitrary page type with very little work. (basically just create the  
> admin you would be prompted to chose “standard page” or “student”
> 
> content types. So for instance:  
> page\_id - (one to one relation back to pages)  
> admin  
> to do might be broken by the currently planned roadmap for the next
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
Alexander H.  
[http://www2.truman.edu/~ah428](http://www2.truman.edu/~ah428)

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [October 20, 2006, 1:24am UTC](https://www.ruby-forum.com/t/where-to-contribute-my-ambitious-change/72931/4 "2006-10-20T01:24:02Z")

</div>

Jacob B. wrote:

> I propose to implement each page type as a database table with a one to  
> one relationship back to the pages table. We will assume that somehow  
> we know about all tables that have this property and thus know that they  
> are page types. I want to implement it so that anybody can create any  
> arbitrary page type with very little work. (basically just create the  
> database table) In my examples I will use the following example type:

This is probably outside the scope of what I have planned for 1.0. You  
are welcome to fork. 🙂

–  
John
