Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Getting just 1 child to Display


Reply


5 Posts   1677 Views

Avatar
corkg

Community Member, 30 Posts

28 August 2008 at 9:22pm

Hw can i get just the latest child to display?

->Parent
----->C3
----->C2
----->C1

So just C3 would be displayed in the Parent?

Thanks

Avatar
grilldan

Community Member, 135 Posts

28 August 2008 at 9:50pm

<% if First %>
<ul>
<% control Children %>
      <li><a href="$Link" title="Go to the $Title.XML page" id="$LinkingMode">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>

Avatar
corkg

Community Member, 30 Posts

28 August 2008 at 9:54pm

Thanks had to change it to make it work by moving the if First:

<ul>
<% control Children %>
<% if First %>
<li><a href="$Link" title="Go to the $Title.XML page" id="$LinkingMode">$MenuTitle</a></li>
<% end_if %>
<% end_control %>
</ul>

Avatar
grilldan

Community Member, 135 Posts

28 August 2008 at 9:56pm

I was close =p

Avatar
Sean

Forum Moderator, 922 Posts

28 August 2008 at 10:07pm

I wonder if you could make that even shorter by using <% control Children.First %> ?