1
{content_a}
    {wygwam:excerpt}
        {value}
    {/wygwam}
    {wygwam:extended}
        {value}
    {/wygwam}
{/content_a}

I wanted to have a readmore button instead, The code above outputs everything from the entry id Can you help me?

Legend: Content_a = contentelement field Wygwam = wygwam under contentelement field

0

There's two ways to go about this that I can think of.

Option A

You can have separate Content Element code for the listing page vs the single-entry page:

Listing page:

{content_a}
    {wygwam:excerpt}
        {value}
    {/wygwam}
    <a href="#">Read More...</a>
{/content_a}

Single-entry page:

{content_a}
    {wygwam} // shows the entirety of the Wygwam field
        {value}
    {/wygwam}

    // Also include the other field types:
    {image} ... {/image}
    {video} ... {/video}
{/content_a}

Option B

You can have an entirely separate Wygwam field (called content_summary here) for the summary/excerpt, leaving the Content Elements field dedicated to the full article content:

Listing page:

{content_summary}
<a href="#">Read More...</a>

Single-entry page:

{content_a}
    {wygwam}
        {value}
    {/wygwam}

    // Also include the other field types:
    {image} ... {/image}
    {video} ... {/video}
{/content_a}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.