1

Just wondering if it is possible to show the {author}, {entry_date} and {comment_total} in the Prev/Next entry links? Here is what I have currently for the Next entry link, but only the {title} field is working—

{exp:channel:next_entry channel="news"}
      <div class="element clearfix col1-3 home grey">
        <a href="{path='news/index'}" title="" class="whole-tile">
        <h3>{title}</h3>
          <p class="small"><span class="italic">by</span> {author} <br />
            <span class="italic">posted</span> {entry_date:relative}<br />
          <span class="italic">with</span> {comment_total} Comments</p>

          <div class="bottom">
            <p class="alignleft">Read more</p>
          <span class="arrow">→</span></div>
        </a> 
      </div>
{/exp:channel:next_entry}

1 Answer 1

0

Those single variables are not available in that tag (exp:channel:next_entry). It would be somewhat inefficient, but you could run a template embed to achieve this. This would be the code in your main template:

{exp:channel:next_entry channel="news"}
    <div class="element clearfix col1-3 home grey">
        <a href="{path='news/index'}" title="" class="whole-tile">
            <h3>
                {title}
            </h3>
            {embed="embeds/next_entry" entry_id="{entry_id}"}
        </a> 
    </div>
{/exp:channel:next_entry}

And this would be the code in your embeds/next_entry template:

{exp:channel:entries entry_id="{entry_id}"}
    <p class="small">
        <span class="italic">
            by
        </span>
        {author} <br />
        <span class="italic">
            posted
        </span>
        {entry_date} <br />
        <span class="italic">
            with
        </span>
        {comment_total} Comments
    </p>
    <div class="bottom">
        <p class="alignleft">
            Read more
        </p>
        <span class="arrow">
            →
        </span> 
    </div>
{/exp:channel:entries}
2
  • You're a superstar, thank you very much :)
    – Elliot
    Jul 27, 2015 at 15:31
  • Test it out, and if it works (you can comment back if you run into issues, always glad to help), please accept my answer as correct! Thanks!
    – jrothafer
    Jul 27, 2015 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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