Skip to content

Instantly share code, notes, and snippets.

@awestmoreland
Last active January 2, 2016 11:59
Show Gist options
  • Save awestmoreland/8300732 to your computer and use it in GitHub Desktop.
Save awestmoreland/8300732 to your computer and use it in GitHub Desktop.
Statamic: Trying to work out how to display information from pages selected via a Suggest field. Support request logged here: http://support.statamic.com/discussions/general-questions-best-practices/6499-how-to-display-information-from-pages-selected-via-a-suggest-field
<h2>Course instructors:</h2>
<dl>
{{ instructor }}
{{ get_content from="{{ value }}" }} <!-- {{value}} returns incorrect data. {value} returns nothing. -->
<dt>Title:</dt><dd>{{ title }}</dd>
<dt>Company:</dt><dd>{{ company_name }}</dd>
<dt>Link:</dt><dd><a href="{{ value }}">{{ value }}</a></dd>
{{ /get_content }}
{{ /instructor }}
</dl>
instructor:
display: Instructor
instructions: Select one or more instructors from the list of members marked as coCreators
type: suggest
create: false
content:
folder: our-community
type: entries
label: title
value: url
conditions: "colearning_type: cocreator"
<h2>Course instructors:</h2>
<dl>
<dt>Title:</dt><dd>Course Title</dd>
<dt>Company:</dt><dd>Andy Co.</dd>
<dt>Link:</dt><dd><a href="/our-community/andy">/our-community/andy</a></dd>
<dt>Title:</dt><dd>Andy</dd>
<dt>Company:</dt><dd>Andy Co.</dd>
<dt>Link:</dt><dd><a href="/our-community/noodle">/our-community/noodle</a></dd>
<dt>Title:</dt><dd>Noodle</dd>
<dt>Company:</dt><dd>Noodle Co.</dd>
<dt>Link:</dt><dd><a href="/our-community/meatball">/our-community/meatball</a></dd>
</dl>
Course instructors:
Title: Course Title
Company: Andy Co.
Link: /our-community/andy
Title: Andy
Company: Andy Co.
Link: /our-community/noodle
Title: Noodle
Company: Noodle Co.
Link: /our-community/meatball
---
_fieldset: course_detail
course_logo: ""
title: Course Title
friendly_title: "This is a course you'll want to take"
_template: course_detail
instructor:
- /our-community/andy
- /our-community/noodle
- /our-community/meatball
---
<p>
Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing. Lorem ipsum dolor sit amet adipiscing.
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment