0

Has anyone used this add-on: Entry Type field

I have it working in the publish page but when I try to use conditionals on the front it fails to work. The developer outlines use as:

{if your_entry_type_field == 'link'}
  {link_url}
{if:else your_entry_type_field == 'video'}
  {video}
{if:elseif your_entry_type_field == 'image'}
  {image}
{/if}

This doesn't seem to work.

This is the setup for the field:

field

{exp:channel:entries channel="prosjektstotte" category="3" limit="" status="open" orderby="date" sort="desc" disable="category_fields|member_data|trackbacks" dynamic="yes"}  
  {if open_fields == "programomrader"}
  <div class="article-block">
    <div class="w-clearfix article-block-inner">
      <h1 class="article-block-title">{if user_language == "no"}{title}{if:else}{if title_en_programomrader}{title_en_programomrader}{/if}</h1>
      <div class="paragraph article-paragraph-block">
      {if user_language == "no"}<h6>{summary_no_programomrader}</h6>{if:else}<h6>{summary_en_programomrader}</h6>{/if}
      {if user_language == "no"}{text_no_programomrader}{if:else}{text_en_programomrader}{/if}
      </div>
     </div>
    </div>
   {/if}
{/exp:channel:entries}

What I thought it did was show only the content inside the fields made visible by selecting "programomrader". Instead it is just showing the last entry posted in the "prosjektstotte" channel.

Putting just {open_fields} in the template returns "programomrader".

Paul

10
  • 1
    I have it working on a couple of sites with conditionals. Show us your template code and also what it displays on the front-end so we can better assist. Jun 4 '14 at 8:44
  • Hi Stephen, thanks. Please see the added info in my edit above.
    – Kippi
    Jun 4 '14 at 15:19
  • If you remove the conditional and just add {open_fields} what do you see on the page? Jun 4 '14 at 16:18
  • If I add {open_fields} it outputs: programomrader (the name of the selected field)
    – Kippi
    Jun 4 '14 at 16:22
  • So, isn't the conditional correct? {open_fields} does not equal prosjektstotte (it equals programomrader) so it shows nothing. Jun 4 '14 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.