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: Redirect when entry translation unavailable

Status Resolved
Add-on / Version Publisher 1.2
Severity Trivial
EE Version 2.7.3

Christopher Imrie

Feb 28, 2014

Hi,
I currently have the following in my templates:

{exp:channel:entries channel="news" dynamic="no" url_title="{segment_3}" disable="member_data|pagination|category_fields"}
<section class="body">
        {if no_results}
            {redirect=404}
        {/if}
        <article class="body-article">
            <h1>{title}</h1>
<p>             ....<br />
        </p>
</article>
</section>
<p>{/exp:channel:entries}

When visiting the template in a language the entry has not been translated into, the {if no_results} conditional is not showing.  What is the best way of achieving this? Basically just want to send them elsewhere if the language translation does not exit.

Possible?

#1

BoldMinded (Brian)

https://boldminded.com/add-ons/publisher/template-tags Scroll down to Additional {exp:channel:entries} Parameters. You can check to see if the translation is complete, e.g. in all languages. You can also try adding publisher_add_translations=”y” to the tag, then you get a new tag pair in your entry {publisher:translations}{/publisher:translations} which contains all the same fields for the translated version of the entry, but it won’t parse things like Matrix or Playa, just basic field values. This is unreleased and a beta feature.

#2

BoldMinded (Brian)

Christopher, did this work for you? I’m going to close this b/c its been over 2 weeks with no response. Feel free to open a new ticket if need be.

Login to reply