# Displaying a specific child's content

**URL:** <https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881>\
**Category:** Radiant CMS\
**Created:** [January 1, 2007, 2:38am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881 "2007-01-01T02:38:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 2:38am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/1 "2007-01-01T02:38:31Z")

</div>

Hello All,  
I’m trying to display the content of a specific child page.  
Is there anyway to do this via radius tags?

I realize that I can do all children (or whatever) via  
r:children:each or :first but I need to do :specificpage and I’m not  
sure how that is done.

Is there a way to do that?  
Thanks,  
BJ Clark

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 2:42am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/2 "2007-01-01T02:42:32Z")

</div>

I don’t really understand your question. You want to display the  
content of a specific child page, where? If you just want to show that  
page simply use [http://yourURL.com/nameOfChildPage](http://yourURL.com/nameOfChildPage) . If you could  
expound a little more what exactly are you trying to accomplish we  
should be able to help you a bit better.

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 3:54am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/3 "2007-01-01T03:54:35Z")

</div>

\<r:find\>

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 12:23pm UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/4 "2007-01-01T12:23:06Z")

</div>

@Clark,

* * *

\<r:find url=“about”\>

## \<r:content part=“body” /\> \</r:find\>

This includes the content of the page ‘about’ into your actual  
page.  
Alternative you could write ‘\<r:content /\>’, because per default  
the body page part is shown (or you could include self defined  
page parts).

Best regards,  
Andreas S.

BJ Clark schrieb:

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/5 "2007-01-01T14:43:17Z")

</div>

@Ruben,

perhaps it’s necessary to code it this way:

* * *

## \<r:find url=“about”\> \<r:if\_content part=“special\_part”\> \<r:content part=“special\_part” /\> \</r:if\_content\> \</r:find\>

Best regards,  
Andreas S.

Ruben D. Orduz schrieb:

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 2, 2007, 1:58am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/6 "2007-01-02T01:58:35Z")

</div>

@Ruben,  
I’m just trying to display the content of certain pages in other pages.

@Andreas,  
Are you sure this works for you? It’s not putting anything in my page.  
I don’t get an error, but it doesn’t do anything either.

Thanks 2 everyone,  
BJ Clark

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 1, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/7 "2007-01-01T13:55:10Z")

</div>

I suppose I misunderstood his question. I thought he wanted to know  
how to access the content of a child page, but in retrospect, I  
realize that he just wanted to show the actual content of a child page  
somewhere else. I think the \<r:find\> tag definitely helps, but I don’t  
know if it is able to bring specific parts of a child page or of it  
will retrieve the content of the whole page. I guess he could play  
with the DB and then do a \<r:find by=“fieldName”\>???

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 3, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/8 "2007-01-03T23:22:48Z")

</div>

I figured it out.  
I was trying to pull a page that was 2 levels below where I was trying  
to pull it from.  
I had to call it by url=“level1/pagename”  
But that works just dandy.  
Thanks all,  
BJ

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 4, 2007, 12:02am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/9 "2007-01-04T00:02:59Z")

</div>

Not to toot my own horn, but that was explained in the Getting started  
wiki. BTW, John, I need to get back to finish that off…maybe this  
weekend if I can find the time.

Best,  
Ruben

---

<div class="post-metadata">

**Author:** ![BJ\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@BJ\_Clark](https://www.ruby-forum.com/u/BJ_Clark)\
**Post date:** [January 2, 2007, 10:33am UTC](https://www.ruby-forum.com/t/displaying-a-specific-childs-content/80881/10 "2007-01-02T10:33:10Z")

</div>

@BJ,

it works for me. The content tag is also described  
here: [http://radiantcms.org/blog/2006/05/11/tag-primer/](http://radiantcms.org/blog/2006/05/11/tag-primer/)

## The example says:

\<r:content part=“sidebar” /\> â†’ Content from the sidebar part of the  
page.

## The part attribute (shown above) allows you to specify which part of the page you would like to render. When used without a part attribute the content tag will render the â€œbodyâ€ part.

Best regards,  
Andreas S.

BJ Clark schrieb:
