taxonomy:get_children_ids
Fetches the entry_ids of a node's immediate children.
{exp:taxonomy:get_children_ids tree_id="1" entry_id="{entry_id}"}
Example output:
2|4|14
Tag Parameters
tree_id=
tree_id="1"
The id of the tree you want to fetch. This is a required parameter.
entry_id=
entry_id="{entry_id}"
The entry_id of the node being requested. This is a required parameter.
Example Usage
The example below shows how we use the tag to pass the entry_ids of the current page's children into an embed to display teaser information for those child pages.
{exp:channel:entries limit="1" disable="categories|member_data|pagination"}
<h2>{title}</h2>
{main_content}
{embed='includes/.teasers' entry_ids='{exp:taxonomy:get_children_ids tree_id="1" entry_id="{entry_id}"}'}
{/exp:channel:entries}
In the embedded template 'includes/.teasers' we would call the exp:channel:entries tag with the fixed_order parameter: fixed_order="{embed:entry_ids}" to keep the order in check with Taxonomy. It also uses Taxonomy's {exp:taxonomy:node_url} Tag to fetch each entries url.
<h3>In this section</h3>
<ul>
{exp:channel:entries fixed_order="{embed:entry_ids}" dynamic="no"}
<li><a href="{exp:taxonomy:node_url entry_id='{entry_id}' tree_id='1'}">{title}</a></li>
{/exp:channel:entries}
</ul>