I'm trying to achieve something that I think might be simple, but I'm just not getting it figured out. What I want is to have a list of my entry titles with links to anchors to the body of the entry immediately below, like this:
title1
title2
title3
body1
body2
body3
Here's the code I've got right now:
{exp:channel:entries channel="channel-name"}
<a href="#{url_title}">{title}</a>
{/exp:channel:entries}
{exp:channel:entries channel="channel-name"}
<a id="{url_title}"></a>
{body}
{/exp:channel:entries}
It seems to me that calling the channel twice is redundant, but I don't know how to get around that. Am I missing something obvious?