Forum
Generating a list of links within a list and detail page
Not sure how to describe this exactly, but here goes.
- I have a standard list and details page set up and working correctly.
- On the details page I am using Blocks to add multiple items (speakers with bio)
- An
id
on the speakers name is set from the name (usingurlify
)
I want to generate a list of links from the all speaker IDs. Heres the detail template:
<h1><perch:content id="group" type="text" label="Speaker Group" required="true" title="true" /><small><a href="/speakers/">Other Speakers →</a></small></h1>
<perch:content id="slug" for="group" type="slug" suppress="true" />
<perch:blocks>
<perch:block type="text" label="Add Speaker">
<div class="speaker">
<h2 id="<perch:content id="speaker" urlify="true" order="2" />"><perch:content id="speaker" type="text" label="Speaker Name" required="true" title="true" order="1" /></h2>
<perch:repeater id="blurb" label="Text Block">
<perch:if exists="blurb-title">
<h4><perch:content id="blurb-title" type="text" label="Block Title" /></h4>
</perch:if>
<perch:if exists="blurb-session">
<p><perch:content id="blurb-session" type="text" label="Block Sub Heading" /></p>
</perch:if>
<perch:content id="blurb-desc" type="textarea" label="Block Text" html="true" editor="redactor" />
</perch:repeater>
</div>
</perch:block>
</perch:blocks>
I think you'd make a copy of the template, keep the blocks but strip them back to just the links. Then output your region again using this new template.
Could you detail that a little further? Currently I am outputting my list and detail region like this:
Would I create the the simplified
speaker_detail
and output it within theif
statement?Where would you like it to appear? Put it at that point in the page.
I was thinking something like: