ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Snippet newbie question

February 19, 2011 5:16pm

Subscribe [3]
  • #1 / Feb 19, 2011 5:16pm

    I have created a snippet called {random-testimonial} which contains the following:

    {exp:channel:entries channel="testimonials"}
    <span class="openingtestimonial">“</span>{quotation}<span class="closingtestimonial">”</span>
    <em>—{byline}</em>
    {/exp:channel:entries}

    Although this same code renders correctly when added directly to a template, it doesn’t work when I refer to the snippet by adding the {random-testimonial} to a template. Why would that be happening (or, rather, not happening)?

  • #2 / Feb 19, 2011 6:05pm

    thomasflad

    8 posts

    Maybe there is a problem with the dash. Have you tried with another name for the snippet (without dashes)?

  • #3 / Feb 21, 2011 3:46am

    John Henry Donovan

    12339 posts

    The Schutz Company,

    Add the dynamic= parameter to the channel:entries tag and try again

    {exp:channel:entries channel="testimonials" dynamic="no"}

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases