These forums are not for official support. If you are looking for official support please click here.

Welcome guest, please Login or Register

You are here: Home :: Forum Home :: Modules :: Channel Files :: Thread

   

SOLVED: Trouble with the file_category tag not being rendered

Rank
Rank

Total Posts: 44

Joined 2010-02-07

PM

 

I’m trying to do the following. The library_files is a Playa field. But the file_category tag is not being processed. But all the others work OK. It’s just returning “{file_category}” literally. This happens regardless of whether or not I try to use it in the if statement is in this code.

{library_files}
  {if 
'{count}' == '1'}<div class="bibliography">{/if}
    {exp
:channel_files:files entry_id="{entry_id}"}
      {if 
"{file_category}"=="wav" OR "{file_category}"=="mp3" OR "{file_category}"=="audio"}
        
<p><class="media" href="{file_url}" target="_blank" alt="{file_title}" title="{file_title}">{file_title}</a></p>
      
{if:else}
    
<p><a href="{file_url}" target="_blank" alt="{file_title}" title="{file_title}">{file_title}</a></p>
      
{/if}
    {
/exp:channel_files:files}
  {if 
'{count}' == '{total_related_entries}'}</div>{/if}
{
/library_files} 
Rank
Rank
Rank
Rank

Total Posts: 2811

Joined 2010-12-24

PM

 

Can you try:

{category} 

See what you get, this could be a mistake in the docs.

Brad

Rank
Rank
Rank
Rank

Total Posts: 2811

Joined 2010-12-24

PM

 

Instead of

{file_category} 

Brad

Rank
Rank

Total Posts: 44

Joined 2010-02-07

PM

 

Yep, that solved it. The variable is incorrectly named in the documentation.

Thanks Brad.