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.

Only show content if custom field exists

April 30, 2012 11:05am

Subscribe [1]
  • #1 / Apr 30, 2012 11:05am

    bootsy

    7 posts

    Hi all,
    I’m having some issues when it comes to conditionally displaying content. I have a list of entries in a channel and only some of those entries contain a pdf brochure so I want the download link to appear ONLY if the channel entry has content in the “brochure” custom field.

    I had this working by using {if brochure}display link{/if} this worked for a while and now for some reason wont work anymore (even though I haven changed anything), next I tried using
    {if brochure != ""}display link{/if} and am having no luck with this either?? any help gratefully received.

    cheers

  • #2 / Apr 30, 2012 11:16am

    Bhashkar Yadav

    727 posts

    Check the field setting for “Default Text Formatting for This Field” if selected “None”?

  • #3 / Apr 30, 2012 11:41am

    bootsy

    7 posts

    Check the field setting for “Default Text Formatting for This Field” if selected “None”?

    Hi Bhaskar, I checked that and the field in question is “file” field and so there are no “Default Text Formatting for This Field” formatting options…good idea though

  • #4 / Apr 30, 2012 3:19pm

    bootsy

    7 posts

    Doh! fixed it, it turns out I had another channel entries tag around the dynamic content which was screwing things up

  • #5 / Apr 30, 2012 9:03pm

    Bhashkar Yadav

    727 posts

    glad to hear it 😊

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

ExpressionEngine News!

#eecms, #events, #releases