Jump to content

CDML - Question about using [FMP-If]


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

Recommended Posts

  • 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

Link to comment
Share on other sites

[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 :-)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This topic is 7342 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.