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.

custom field drop-down list

June 05, 2009 4:53pm

Subscribe [1]
  • #1 / Jun 05, 2009 4:53pm

    ericandrewscott

    12 posts

    In one of my weblogs, there is a drop-down list as a custom field, where you upload an image and delegate it as 1 of 4 types of media images. The drop-dowm custom field is called “mediatype”. If the options are “Option1” through “Option4”, how do I display only entries that are of Option1? This is what I have and it blows up when I throw in the if statement to check the value of the custom field…

    <div><ul>
    {exp:weblog:entries weblog="press" orderby="date" sort="desc"}
        {if mediatype = "Option1"}
            <li><a href="http://{pressfilename}" target="_blank" rel="noopener">{pressfilename}</a></li>
            {if no_results}
                <li>There are no files available.</li>
            {/if}
        {/if}
    {/exp:weblog:entries}
    </ul></div>
  • #2 / Jun 05, 2009 5:47pm

    Lisa Wess

    20502 posts

  • #3 / Jun 05, 2009 5:50pm

    ericandrewscott

    12 posts

    thank you very much! excellent painless answer!!!

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

ExpressionEngine News!

#eecms, #events, #releases