Categories in Runway
Hi,
I want to filter my collection by a category, i have the below as part of my collection template
<perch:categories id="service" label="Type of case study" set="service" required="true" />
<perch:content id="url_service" type="slug" for="service" urlify="true" />
And im using this as part of my url
<perch:content id="url_service" type="slug" urlify="true" />
I have also set my route us as follows
case-studies/[slug:service]/[slug:client]
Now this i think works fine apart from the slug in the url is out putting as
/case-studies/ra-d41d-cd98/test
and not the category title, i guess its stored as this but i need to request it in another way?
If i hard code my category into my url and hard on my page with
perch_collection('Case Studies', [
'filter' => 'url_client',
'value' => perch_get('client'),
'category' => 'service/ra-d41d-cd98',
]);
this all works.
any ideas.
thanks in advance.
This is wrong:
ra-d41d-cd98
Can you show me your diagnostics report?
What's the name of your category?
For some reason the slug isn't being correctly generated on your server.
Odd, The set is Service and the cat is Corporate Identity
Are all your slugs doing the same thing?
yes all the category slugs.
Is your hosting configurable? You don't have the Transliterator extension available in PHP at the moment. That's not required, but it may help in this situation.
I host with Mediatemple so i can take a look.
can you point me in the right direction of what i might do?
I've not used MediaTemple, so I'm not sure. Is there somewhere you can select optional PHP extensions?
I can look into this, i believe there is however. Is there anything else i should also check?
I can't think of anything that should cause this issue, to be honest.
Media Temple, have referenced this. any thoughts. I guess nobody else is seeing this issue?
media temple response:
If you are able to use the "Transliterator" as described on php.net: https://php.net/manual/en/class.transliterator.php
You should be able to just include the class into your current scripts and implement it that way.
Ok, great, that's what we need.
can you point me in the right direction of what i should do? appreciate your out the country.
If they've enabled the transliteration functions, do you now see it in the diagnostics report?
Ok, nope Transliteration functions: No
So you guys have already included the class in your scripts then i assume?
It's an extension to PHP. Perch uses it if it's available on the server.
ok so i've manually gone about adding it, this seemed to go ok but i although i believe i have added it to the php.ini i did get this during install, see 4th line.
i also created a phpinfo.php file which you can see here https://new.calico-uk.com/phpinfo.php and this lists translit as enabled.
Ok, great. Is it showing up now?