Forum
Get product slug for Perch Shop
Hi I'm trying to get the product slug from the URL to output products in the new Perch shop but cannot get it working.
In my list template I have the following:
<a href="/shop/products/index.php?product=<perch:shop id="slug" type="slug" />/">
and then to add this slug into the perch_shop_product function on my product page:
perch_shop_product(perch_get('product'));
...but it doesn't work - can you tell me where I've gone wrong?
Thanks! Alex
Which part isn't working? The first place to look would be at that trailing slash you're adding to the slug.
Doh! Thanks Drew - I missed that. Works fine now...