Hi everyone - I have a really weird problem, must be doing something wrong and hoping someone can point me in the right direction…
I have a template for multiple pages (service) which I’m calling from a channel (services) dynamically in another template (services). The channel contains information about services, with a title, short description, long description and call to action. I’m calling the service template by adding the url_title to the end of my URL on my services page, then using URL segments to pull it out on my service page (using the url_title segment to tell the channel which entry to pull back and populate the service template with. Phew!
This works great, but the problem is when I try to add any other channel data in the service template (from my portfolio for related work, and another channel for related services). Both of these channels aren’t rendering at all. I know the code is good as I’ve used exactly the same code in other areas of the site and they work fine.
The only conclusion I can come to is that using the URL segment is throwing it out somehow. Has anyone else experienced this or can anyone point out where I’m going wrong? I can’t find any other examples of this issue in the forums…
Here’s a snippet if this helps:
<div class="service-content">
{exp:channel:entries channel="services" url_title="{segment_3}"}
<h1>{title}</h1>
{service_long_desc}
{/exp:channel:entries}
</div>
<div class="inner">
<span class="title sub black">Related Work</span>
<div class="related-work shadow">
{exp:channel:entries channel="portfolio"}
<div class="folioentry nojs">
{preview}
<div class="foliodesc">
<span class="folio-title">{title}</span>
{short_desc}
<a>{site_url}images/site/folio-btn.gif</a>
</div>
</div>
{/exp:channel:entries}
</div>