# Radiant as a news a bit more improved

**URL:** <https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111>\
**Category:** Radiant CMS\
**Created:** [March 26, 2007, 4:13am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111 "2007-03-26T04:13:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 26, 2007, 4:13am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/1 "2007-03-26T04:13:41Z")

</div>

Hi everyone,

I am new to Radiant, and I need some help. I have a website that have  
static pages and news.

My news have a field for the source(where i found it) and a field for  
an url to the source.

Radiant can be modified to to have these fields in pages that are  
child of “Articles”? How to do this?

Any help is appreciated.

Thanks,  
Mergulhão

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 26, 2007, 11:14am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/2 "2007-03-26T11:14:00Z")

</div>

On 3/26/07, Sylvestre MergulhÃ£o [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My news have a field for the source(where i found it) and a field for  
> an url to the source.

You can do what many people do with Radiant in such cases: use page  
parts.

Simply create a new page part named “source” and put relevant  
information  
there. After that you can render this information where and when you see  
fit.

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 26, 2007, 3:53pm UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/3 "2007-03-26T15:53:09Z")

</div>

> My news have a field for the source(where i found it) and a field for  
> an url to the source.

I forgot to say that each Article belongs to one category, that are  
selected among five others.

Thanks,  
Mergulhão

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 26, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/4 "2007-03-26T15:57:10Z")

</div>

> You can do what many people do with Radiant in such cases: use page parts.
> 
> Simply create a new page part named “source” and put relevant information  
> there. After that you can render this information where and when you see  
> fit.

Ok, I understood. But are there a way to make a new form page with  
these fields in admin? So I can create the news in a intuitive way. If  
not, it will be to boring… create a page for a news, create a page  
part for the source. And so on for any new news.

Thanks,  
Mergulhão

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 26, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/5 "2007-03-26T15:57:10Z")

</div>

For this you are going to need some sort of tagging support. I have  
an extension that is about half done, though I am not sure how long  
it will take. There were some name space issues, but those are pretty  
much solved. One thing you can do is a bit of a hack: use a part with  
the name of your category, i.e. “News” or “Sports”. The using the  
\<r:if\_part /\> tag you can filter them out.

Like I said, a hack, but it does work. A little tough on the database  
perhaps…

Keith B.  
Tel: +49-7731-79838380  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 27, 2007, 2:18am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/6 "2007-03-27T02:18:26Z")

</div>

> these fields in admin? So I can create the news in a intuitive way. If  
> not, it will be to boring… create a page for a news, create a page  
> part for the source. And so on for any new news.

Yes there is - have a look at the code in the facets branch and/or have  
a look in the archives of the radiant-dev list for some  
discussion on that branch.

I did a similar thing (but not using facets, using my own pre-facets  
‘admin\_parts’ extension which isn’t nearly as cool) - have a  
look through the code at  
[http://soxbox.no-ip.org/radiant/svn/extensions/x\_groggy/](http://soxbox.no-ip.org/radiant/svn/extensions/x_groggy/) - I’ve got a  
custom ComicPage and also a custom  
GroggyArticlePage that add fields to the admin screen and store them in  
a separate table.

Dan.

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 27, 2007, 4:26am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/7 "2007-03-27T04:26:35Z")

</div>

On 3/26/07, Daniel S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I did a similar thing (but not using facets, using my own pre-facets ‘admin\_parts’ extension which isn’t nearly as cool) - have a  
> look through the code at [http://soxbox.no-ip.org/radiant/svn/extensions/x\_groggy/](http://soxbox.no-ip.org/radiant/svn/extensions/x_groggy/) - I’ve got a custom ComicPage and also a custom  
> GroggyArticlePage that add fields to the admin screen and store them in a separate table.

Oh! Thats what I need. I will look your code!

Thanks

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 28, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/8 "2007-03-28T16:55:10Z")

</div>

Dan,

Your extension is for the mental branch or works with 5.2 too?  
I’m i bit confused with the versions yet.

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [March 27, 2007, 12:26am UTC](https://www.ruby-forum.com/t/radiant-as-a-news-a-bit-more-improved/90111/9 "2007-03-27T00:26:19Z")

</div>

On 3/26/07, Keith B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> For this you are going to need some sort of tagging support. I have an  
> extension that is about half done, though I am not sure how long it will  
> take. There were some name space issues, but those are pretty much solved.  
> One thing you can do is a bit of a hack: use a part with the name of your  
> category, i.e. “News” or “Sports”. The using the \<r:if\_part /\> tag you can  
> filter them out.

But how can I make a form page that contain these extra fields that i  
need and when a do the “submit” it automagically create these part  
pages? So a i dont need to create it by hand for every news.

> Like I said, a hack, but it does work. A little tough on the database  
> perhaps…

Hack the code and the database is not a problem. I am just asking here  
whats the better way to do what a I need because I am new to radiant,  
and start learning its code yesterday.

Thanks  
Mergulhao
