I'm trying to build an articles page, which would display blocks of interactive media in the flow of the main story – similar to the Snow Fall article at NYT.
The Replicator concept seems to be failing me. I has hoped it would allow me to augment the content area with additional media, but that appears not to be the case. No content from existing blog posts appears in the {{ content }} tag when I use it as I'd like to:
Here's the template code I have:
<article class="post">
<section>
<h6>{{ date }}</h6>
<h1>{{ title|smartypants|widont }}</h1>
</section>
{{ post_replicator }}
{{ if type=="content_set"}}
<section>
{{ content }}
</section>
{{ elseif type=="callout_set" }}
<section>
#Interactive Stuff here
</section>
{{ elseif type=="img_set" }}
<section>
#Interactive Stuff here
</section>
{{ endif}}
{{ /post_replicator }}
</article>
And my template fields
fields:
## Metadata for post
categories:
display: Categories
required: false
default:
type: tags
meta_section:
type: section
display: Post Content
instructions: Write an awesome post
## Replicator for Content
post_replicator:
type: replicator
instructions: |
Replicate a new set for each piece of content you need.
sets:
## Replicator sets echoed in template
##Content
content_set:
display: Content (Markdown)
fields:
content:
display: Text
type: markitup
##Fancy Call outs
callout_set:
display: Callout
fields:
quote:
type: textarea
height: 40
instructions: What was said?
cite:
type: text
instructions: Who said it?
##Image with Caption
img_set:
display: Image
fields:
photo:
type: file
allowed: [png, jpg, gif]
destination: assets/img/
caption:
type: text
instructions: Describe the photo
hide: true