Jump to content

This topic is 7115 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to have a container field display it's self if there is an image file stored in it or if there isn't

Tried this:

[FMP-if: Child_Photo .ncn.] [/FMP-if]

Didn't work frown.gif Can someone help? Thanks !!

P.s. "Child_Photo" is the name of the container field.

Posted

Maybe I'm missing something, but isn't that what a container field is suppose to do by default? If there is content inserted into the container, it'll show what it is (like a picture in this case).

Is there something you wanted to 'show' if the container is empty? If so, then -

If [ isEmpty(Child_Photo) ]

Display some text in a text field like "No Picture Available"

EndIf

  • 3 months later...
Posted

My approach was to create a calculated field, cn_photo_exists_fl, which is defined as:

If(IsEmpty(ec_photo_container), 0, 1)




Then in the CDML, I can test on the flag field, like so:




[FMP-If: cn_photo_exists_fl .eq. 1] 

    (HTML and CDML code to display image)

[/FMP-If]

Works well for me, though if you have a lot of container fields, you need a corresponding lot of calculated fields...

This topic is 7115 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.