How do you display select Fields from a Matrix Block Type when there are multiple Fields? How do you display select Fields from a Matrix Block Type when there are multiple Fields?

I have 1 Matrix Field with Handle ‘Quotation’

The configuration for this Matrix is as follows:

1 Block Type with handle ‘quote’

This Block Type has 3 plain text Fields:
‘Quotetext’
‘QuoteBy’
‘QuoteUrl’

I havent been able to get any output at all from this Matrix following the documentation and into following HTML structure:

&lt;blockquote&gt;
    &lt;p&gt;Quotetext&lt;/p&gt;
    &lt;cite&gt;QuoteBy&lt;/cite&gt;
    &lt;a href="QuoteUrl"&gt;QuoteUrl&lt;a&gt;
&lt;/blockquote&gt;


Can anyone help me solve this issue?
Thank you
It might seem counter-intuitive in cases where you only have 1 block type (i.e. quote) and only a single block, but your Matrix field will always be an array, where the blocks (i.e. the "children" of the Matrix array) aren't directly accessible:

entry.quotation
    - block1 (quote)
    ...


Usually, you'll output your blocks by looping through the Matrix field, checking each block's type. I find that using a {% switch %} statement is often cleaner than an if/else:

{% for block in entry.quotation %}

    {% switch block.type %}

         {% case 'quote' %}
         &lt;blockquote&gt;
             &lt;p&gt;{{ block.quoteText }}&lt;/p&gt;
             &lt;cite&gt;{{ block.quoteBy }}&lt;/cite&gt;
             &lt;a href="{{ block.quoteUrl }}"&gt;QuoteUrl&lt;a&gt;
         &lt;/blockquote&gt;

    {% endswitch %}

{% endfor %}


You can, however, opt to only output blocks of a certain type. This is done by "filtering" the Matrix field using the type method, and removes the need for the switch or if/else statement. This is convenient in cases where you know you'll only have 1 block type:

{% for quote in entry.quotation.type( 'quote' ) %}
    &lt;blockquote&gt;
         &lt;p&gt;{{ quote.quoteText }}&lt;/p&gt;
         &lt;cite&gt;{{ quote.quoteBy }}&lt;/cite&gt;
         &lt;a href="{{ quote.quoteUrl }}"&gt;QuoteUrl&lt;a&gt;
     &lt;/blockquote&gt;
{% endfor %}


If you know there's only 1 block, you can even remove the loop entirely by explicitly targeting the first block for your filtered block type. The actual amount of code will be about the same as the above example, though:

{% set quote = entry.quotation.type( 'quote' ).first %}
{% if quote %}
    &lt;blockquote&gt;
        &lt;p&gt;{{ quote.quoteText }}&lt;/p&gt;
        &lt;cite&gt;{{ quote.quoteBy }}&lt;/cite&gt;
        &lt;a href="{{ quote.quoteUrl }}"&gt;QuoteUrl&lt;a&gt;
    &lt;/blockquote&gt;
{% endif %}