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.

CDML - Question about using [FMP-If]

Featured Replies

  • Newbies

I'm assume (which might be my first problem) this is a really simple [FMP-If] statement I'm trying to do.

I have several database fields that I only want to show on a web page if there's data in the field. These are standard text fields, not things like a checkbox or yes/no field.

I would like to do something like:

[FMP-If: FieldName .neq. null/blank] [/FMP-If]

Or something like this. I don't want the field to show if there's no text in it, and to show if there is text in the filed. I know the syntax about wouldn't work, as it would look for "null/blank".

Maybe I need to use an If, Else statement -- but I still don't know how to block a blank field or the syntax for it using FMP-If.

Any assistance would be great - thanks!

--

Walter

[FMP-If: FieldName.eq.]

<!-- field is blank so nothing happens -->

[FMP-Else]

<!-- field contains seomthing -->

There are [FMP-Field: FieldName] colours to choose from.

[/FMP-If]

By rights [FMP-If: FieldName.neq.] should work (and thus not require the [FMP-Else] but my experience is sometimes it works, sometimes it doesn't :-)

  • Author
  • Newbies

That did the job -- thank you! smile.gif

--

Walter

  • 2 weeks later...

Would like to know how to make an [FMP-If] statement check for a Token, and if the token isn't present have the person redirected to another page.

Not sure how to do it the IF statment part, but I know how to get a token passed.

Any help would be appreciated.

Try this:

[FMP-If: CurrentToken .eq.]

		[include: filename.htm]

[FMP-Else]  

		[include: anotherFile.htm]

[/FMP-If]

Good Luck.

Garry

Gary,

Thanks for the fast reply. smile.gif

One quick question in the above example if I wanted to check for a specific token value (Say the number 1) would I format it as so:

[FMP-If: CurrentToken .eq.1]

[include: filename.htm]

[FMP-Else]

[include: anotherFile.htm]

[/FMP-If]

Yes, you can place the value to test for on the the right-hand-side of the .eq.

If you want to test a specific token you can do this:

[FMP-If:CurrentToken:3 .eq. 1]

All the best.

Garry

p.s. See if you can get hold of the "CDML Reference" database.

Gary,

Thanks much smile.gif

That solved all my problems. I have a copy of the old Claris Homepage and it has reference files in building CDML, but I guess I'd better read the CDML Reference database.

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.