Jump to content

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

Recommended Posts

  • Newbies
Posted

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

Posted

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

  • 2 weeks later...
Posted

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.

Posted

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]

Posted

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.

Posted

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.

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