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: translated routes for Template routes

Status Resolved
Add-on / Version Publisher 3.1.5
Severity
EE Version 5.3.2

Burgi von Mengershausen

Oct 07, 2020

Hi Brian,

i did not find any documentation on how to use the “Route” input fields within “Add-On Manager > Publisher > Template Translations”.

I have set up template routes in “/cp/design/routes” (please see first attached screenshot) and they work well.

However i’m not able to figure out how to set up the translated routes in “Add-On Manager > Publisher > Template Translations”. (please see second attached screenshot).

So the following URLs work (please note: links not public … site is offline):
DE:  https://tannerhof.org/de/was-geht/wochenprogramm
EN:  https://tannerhof.org/en/whats-on/weekly-workout

The following URL works also:
DE:  https://tannerhof.org/de/was-geht
and shows the content of https://tannerhof.org/de/was-geht/wochenprogramm because of the template route

However this does not work:
EN:  https://tannerhof.org/en/whats-on
because it shows the content of:  https://tannerhof.org/en/whats-on/index and ignores the translated template route (please see second attached screenshot)

Please help.
If there is any documentation on this feature please point me to it.

Thanks
Axel

#1

BoldMinded (Brian)

Burgi, due to the EE Conference, I’m incredibly busy this week, so I won’t be able to look into this until next week. Sorry.

#2

BoldMinded (Brian)

Burgi, the main question I have is why do you have the routes setup the way you currently do? For example, you have the template group was-ghet, and the template name wochenprogramm, which is a valid url of /was-ghet/wochenprogramm/, but you have the route defined as /was-ghet/, so if the user goes to /was-ghet/ they will see the wochenprogramm template. Why not just use the index template in the was-ghet group and not define a template route? All your template routes are defined this way, and it doesn’t seem to add any real benefit. You could just as easily use the index.html template in all of those groups and don’t define any routes. I could be wrong, but it doesn’t seem like you’re using EE’s native template routes correctly. If this is not the case, would you be able to further explain why you have the routes defined the way you do?

#3

Burgi von Mengershausen

Hi Brian,

https://tannerhof.org/de/was-geht/wochenprogramm is the template to give a listing overview about the “was-geht” section

https://tannerhof.org/de/was-geht/index is the template used to render all single entries/articles within the “was-geht” section

so for example https://tannerhof.org/de/was-geht/kreativraum is the entry “kreativraum” within the “was-geht” section rendered by the https://tannerhof.org/de/was-geht/index template or https://tannerhof.org/de/was-geht/galerie-im-treppenhaus is the entry “galerie-im-treppenhaus” within the “was-geht” section rendered by the https://tannerhof.org/de/was-geht/index template

That is the reason why i need the routes. Please point me to the documentation on how to use the “Route” input fields within “Add-On Manager > Publisher > Template Translations”.

Thanks Axel

#4

BoldMinded (Brian)

The route translations in Publisher should be the exact same thing in your default routes, just the translated version.

Based on what you’re doing, I’m not even sure you need routes defined at all. Routes are usually just used when you need to do something out of the norm with normal template routing… it looks like you’re just using EE’s templates as they normally would be used to create URLs. I think you can ignore the Routes all together, and the Route field in Publisher, and just enter the template translations into the field that has “Template” as the placeholder.

Did you read the EE docs about template routes? https://docs.expressionengine.com/latest/templates/routes.html

#5

Burgi von Mengershausen

Comment has been marked private.

#6

BoldMinded (Brian)

Can you edit the ticket and use the provided fields and add CP access so I can login and take a closer look?

Regarding “/de/fasten” and “/de/fasten/one” showing the same content, that is actually not a good idea SEO wise. You have 2 URLs showing the same stuff, Google actually penalizes you for that.

I’m not trying to be difficult, I’m just not sure why you want the content of the “fasting/one” template to show at the url fasting… why not just use the “fasting/index” template? I’m not understanding why you need to use routes at all. Based on what information I have so far, I think you’re overcomplicating it. Routes are only meant to be used for when you’re doing complicated URL routing. So far what I’ve seen is just “template_group/template” based default EE routing behavior, but you’re not taking advantage of the index template and EE’s default behavior.

If you look at the documentation it uses an example with an “events” template group: https://docs.expressionengine.com/latest/templates/routes.html#usage If you were to copy that example and put it into Publisher’s routes, then it’ll look like this:

/veranstaltungen/{date:regex[(\d{2}-\d{2}-\d{4})]}

https://www.dropbox.com/s/eb7jacm27xkfrcv/ticket-2173-events-route.png?dl=0

#7

Burgi von Mengershausen

Comment has been marked private.

Login to reply