Create Listings
NOTE: Listings must be attached to a page and the channel used for a listing can not have any Structure data posted to it to avoid duplicate URLs and hierarchy.
- Assign a channel to the type “Listing” under Structure » Channel Settings and assign it the default template you want your pages to use
- Edit the page you want to attach your listing to
- Click the Listing checkbox and select the channel you assigned in the first step
- Save and return to the Structure CP
- You can now add/edit entries in this channel attached to the original page
Using Listings
Listings are always attached to another page, each entry in the listing contains page data (like URLs) of their own. They are effectively subpages of the containing page, but do not show up in the navigation hierarchy. Listings are useful for any content that is generally a large set, are not structural, but appear in a list on the containing page - like events, news, blog posts, etc. They generally click through to some kind of detail page, but they can also be used for smaller sets if you do not want the entries to appear within navigation, but output on a single page, like staff bios.
When visiting the containing page, listings are just like displaying entries as you normally do in EE when unrelated to the current template or URL. Because we want to display data unrelated to the current page, adding dynamic="off" tells EE to display a listing of entries other than the current page. This way, you can still have page data and content associated with a page containing a listing and show the actual listing entries. You link to pages with page_url and page_uri instead of the traditional template_group/template permlink method.
<ul>
{exp:channel:entries channel="your-listing-channel" dynamic="no"}
<li><a href="{page_url}">{title}</a></li>
{/exp:channel:entries}
</ul>