Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Show image in container if available

Featured Replies

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.

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...

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...

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.