---
title: "Rendering an Item's Children"
description: "Fetching and rendering an item's children is a core Sitecore development pattern. TechGuilds covers the API methods and rendering approaches used in practice."
canonical: "https://www.techguilds.com/blog/rendering-an-items-children/"
type: "BlogPosting"
author: "Nabil Orfali"
publishedAt: "2016-07-05T04:00:00.000Z"
updatedAt: "2026-05-21T19:24:43Z"
source: "https://www.techguilds.com/llms.txt"
---

# Rendering an Item's Children

## Getting the Item's Children

Getting an item's children is a basic but important piece of logic that is used frequently within Sitecore.

Let's say you have an item "A", which has two children, items "B" and "C", and you want to display links to items B and C from item A. In this article, we will explore how to do that.

Start by creating a Sublayout and binding it to a placeholder ( [see the article "Layouts, Sublayouts, and Placeholders" for more details](https://www.techguilds.com/blog/layouts-sublayouts-and-placeholders)).

To retrieve the item's children, navigate to your Sublayout's code behind file (.ascx.cs) in the Visual Studio Solution Explorer and add the following code to the Page_Load function:

```text
TheRepeaterID.DataSource = Sitecore.Context.Item.GetChildren();
TheRepeaterID.DataBind();
```

What we are doing is that we are first getting the item's children and binding the data to a repeater, which we will create and reference in the Sublayout's file as show here:

```text
<asp:Repeater ID="TheRepeaterID" ItemType="Sitecore.Data.Items.Item" runat="server">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li>
<asp:HyperLink ID="HyperLink1" Text="<%#: Item.Name %>" NavigateUrl="#" runat="server" />
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
```

## Getting the Children's Links

The repeater will render the item's children, but without the links. We can **add the links by simply replacing NavigateUrl="#" with**:

```text
NavigateUrl="<%#: Sitecore.Links.LinkManager.GetItemUrl(Item, new Sitecore.Links.UrlOptions { UseDisplayName = true }) %>"
```

Master this process and you're well on your way to being a Sitecore professional developer.
