Hi Folks,
I have a site where I am trying to pull in related products using Playa, because of my template structure (for clean URL’s and in using the Structure module) I have a template for the single product that loads the correct embed based on URL segments.
Anyhow, I need to be able to get the category_url within a Playa loop for the specific related products that are been output - my code is below:
{exp:weblog:entries weblog="simple_content"}
<h1>{title}</h1>
{page_body}
{if related_products}
<div class="relatedProducts">
<h3>Related Products</h3>
<p>{related_products}</p>
<p><div class="related-products"><br />
{product_images limit="1"}<br />
<a href="http://{path=products/{category_url_title}}{url_title}">{site_url}scripts/timthumb/timthumb.php?src={product_image}&h=130&w=130&zc=1</a><br />
{/product_images}<br />
<strong><a href="http://{path=products/{category_url_title}}{url_title}">{title}</a></strong><br />
</div> </p>
<p>{/related_products}<br />
</div> <br />
{/if}</p>
<p>{/exp:weblog:entries}