ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to test if file fieldtype is filled?

October 25, 2011 3:58am

Subscribe [2]
  • #1 / Oct 25, 2011 3:58am

    Mvd

    4 posts

    I want to test if a user has uploaded and added an image to a file fieldtype, and then output it. This returns blank:

    {if title_of_a_field}
    {title_of_a_field}{path}{filename.{extension}{/title_of_a_field}
    {/if}

    There are also some css style on img tag, but they are removed in this post.

    Thanks!

     

  • #2 / Oct 25, 2011 5:36am

    Mvd

    4 posts

    The issue was somewhere else, and the code above works fine now - and tests the file fieldtype for content.

  • #3 / Oct 25, 2011 8:59am

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases