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: Show 404 when the translation is not there

Status Resolved
Add-on / Version Publisher 1.2.2
Severity Critical
EE Version 2.7.3

Rein

Mar 18, 2014

Hi,

Is it possible to show a 404 (or something else) when the translation is not there?

Let me know.

Best,
Rein

#1

BoldMinded (Brian)

Yep, check out the Template Tags docs section titled Additional {exp:channel:entries} Parameters.

#2

Rein

Yes i see, but thats not really what i needed.

I need a variable or tag, that can be used in an if statement to check if the translation for the current language is translated.

{exp:channel:entries publisher_fields="publisher:"}
    {if publisher:is_translated}
       This language is translated
    {if:else}
      Language is not translated, show a message or redirect to 404, or something else
    {/if}
{/exp:channel:entries}

Hope you will understand it, otherwise let me know.

Best, Rein

#3

BoldMinded (Brian)

Emailing you a new build. The variable will be “has_translation”.

#4

BoldMinded (Brian)

Rein, did the new variable work out for you?

#5

Rein

Yes, the variable works great!

Best, Rein

Login to reply