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: What if an entry is not translated

Status Resolved
Add-on / Version Publisher 1.6.6
Severity
EE Version 2.9.2

Rein

Oct 14, 2015

Hi Bryan,

How can i disable the page for a specific entry when it has no translation.

I just want to show the language that is translated.

Let me know.

Best,
Rein

#1

BoldMinded (Brian)

If I understand your question correctly, there is an {has_translation} variable you can use in an entries loop.

#2

Rein

Yes, but has_translation will check if all translations are complete. I want to show a message for the current language that has no translation.

#3

BoldMinded (Brian)

There currently isn’t a variable option to do that. Its kind of a round about way, but you could put this in your entries tag:

{exp:publisher:translate_entry entry_id="{entry_id}" lang_id="2"}
 ... do something ...
{/exp:publisher:translate_entry}
#4

BoldMinded (Brian)

var_prefix and status are the other 2 parameter options on that tag. E.g. var_prefix=”translated:”

{exp:publisher:translate_entry entry_id="{entry_id}" lang_id="2"}
    {translated:title}
{/exp:publisher:translate_entry}
#5

Rein

Thats not a solution, it should be dynamic and in the context of the current language…

But is it not simple to create 2 extra if vars

{exp:channel:entries entry_id=”{entry_id}”} {is_translated} show content{/is_translated} {not_translated} Show message or a redirect{/not_translated} {/exp:channel:entries}

and use the channel_entries_tagdata hook to catch those params.

or

{exp:channel:entries entry_id=”{entry_id}”} {if is_translated} show content{/if} {if not_translated} Show message or a redirect{/if} {/exp:channel:entries}

and parse is_translated and not_translated as a bool.

let me know.

#6

BoldMinded (Brian)

Comment has been marked private.

#7

BoldMinded (Brian)

Rein, does the latest build work for you?

#8

Vrede en Recht

Nope, it shows the text {publisher:is_translated} sdfsdfsdf {/publisher:is_translated}

#9

BoldMinded (Brian)

It’s not a tag pair, just a variable. What does your entries tag look like?

#10

Rein

aaah ok, I try it again.

Login to reply