Hello,
I have been stuck on a next entry problem for quite a few hours now, so I am turning to the forums here in the sincere hope that someone can shed some light on where I’m going wrong.
Essentially, I have a page that lists the last 3 entries for each of about 20 categories. The following is working correctly:
———————-
{exp:channel:categories channel="testimonials" style="linear"}
<b>{category_name}</b>
{exp:channel:entries channel="testimonials" category="{category_id}" dynamic="off" disable="member_data" limit="3" paginate="bottom"}
<b>{title}</b>
{exp:word_limit total="30"}
{testimonial}
{/exp:word_limit}
<a href="http://{url_title_path=testimonial/quickview}">View >></a>
<hr>
{/exp:channel:entries}
{/exp:channel:categories}———————-
On the quickview template, I have the following:
{exp:channel:entries channel="testimonials" disable="member_data" limit="1"}
<h2>{title}</h2>
<p> {testimonial}</p>
<p>{/exp:channel:entries}</p>
<p>{exp:channel:next_entry channel="testimonials" disable="custom_fields|member_data|pagination"}</p>
<p> <b>Next Testimonial:</b> <a href="http://{path=testimonial/quickview}">{title}</a></p>
<p>{/exp:channel:next_entry}—————————
Now, if I add category=“6”, (Or any category id) to the channel:next_entry tag it will properly link the next entry that is available in that category. But what I really need, is to get the {category_id} dynamically, based on the category the entry was opened from in the first template.
The problem is that the quickview template doesn’t have the category url segment that the entry came from, so how do I access it? Do I modify the link from the original template, and if so how do I grab it in the second?
Perhaps a query is required? I hope not, as using queries in EE would be new territory for me. The various entries could be in multiple categories, so I don’t know if this would be the way to go.
Anyhow, thank you for reading this post and offering your ideas to get me on the right track. It’s appreciated ...