Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: category_url_title translations in relationship
Status | Resolved |
Add-on / Version | Publisher 2.6.4 |
Severity | |
EE Version | 3.5.11 |
Davide Barbieri
Oct 24, 2017Hi Brian,
Description:
I can’t retrieve the translated category_url_title in the path to related entries.
Example (where “relation” is the name of the relationship field):
{relation}
<a href="{path='cards/'}/{relation:categories limit="1" show_group="1"}{category_url_title}{/relation:categories}/{relation:url_title}">{relation:title}</a>
{/relation}
I replicated the issue in the demo site:
- please open the “Sol Ring” card page;
- under the image there’s a link to the “Brainstorm” card, created via a relationship;
- the rendered url is http://demo.boldminded.com/en/cards/blue/brainstorm;
- or http://demo.boldminded.com/de/karten/blue/gedankenwirbel if you switch to German.
What i’m looking for is to also have the “blue” word in the url to be “blue-en” or “blue-de” (the existing translations for the category url titles).
Since I’m new to Publisher I may have overlooked something.
Thank you,
Davide
BoldMinded (Brian)
Davide, it doesn’t look like those pages you linked to are displaying anything.
BoldMinded (Brian)
Also, are you sure its not supposed to be {relation:categories limit=”1” show_group=”1”}{relation:category_url_title}{/relation:categories}?
BoldMinded (Brian)
Davide, this isn’t as clean looking, but it works:
Unfortunately {category_url_title} isn’t parsed in time for the {path} variable to handle the translation.
Davide Barbieri
Hi Brian, I think there’s something missing in the code above, but it helped me using exp:publisher:translate_category, and I got it working (with a very verbose code):
Outputs:
which is what I needed.
If I put the {relationship_filed:categories} tag outside of the <a> tag as suggested, for some reason, the resulting url is ok in the secondary languages pages, but in a default-language page renders like this:
which contains an additional “category” segment, that I don’t want in the url.
I think you can close the ticket as for now, thank you!