Last active
September 27, 2023 22:39
-
-
Save scottgruber/ae5211e759fd9703685368b224359b10 to your computer and use it in GitHub Desktop.
Build nav links with Perch pagelist addon and repeater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aside> | |
<h4><perch:content id="heading" type="text" label="Heading" required="false" help="Put heading of section here." title="true" /></h4> | |
<perch:repeater id="links" label="Links"> | |
<perch:before> | |
<nav> | |
<ul> | |
</perch:before> | |
<perch:if exists="external_url"><li><a href="<perch:content id="external_url" type="text" label="External URL" help="Paste url if link is outside Perch." order="3" />"><perch:content id="url_title" type="text" label="Link Title" help="Put name of link here" order="1" required="true" title="true" /></a></li> | |
<perch:else /> | |
<li><a href="<perch:content id="page" type="pagelist" label="Page" help="Select a page that lives inside Perch" order="2" />"><perch:content id="url_title" type="text" label="Link Title" help="Put name of link here" order="1" required="true" title="true" /></a></li> | |
</perch:if> | |
<perch:after></ul></nav></perch:after> | |
</perch:repeater> | |
</aside> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment