February 24, 200421 yr 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
February 24, 200421 yr [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 :-)
March 9, 200421 yr 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.
March 9, 200421 yr Try this: [FMP-If: CurrentToken .eq.] [include: filename.htm] [FMP-Else] [include: anotherFile.htm] [/FMP-If] Good Luck. Garry
March 9, 200421 yr Gary, Thanks for the fast reply. 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]
March 9, 200421 yr 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.
March 10, 200421 yr Gary, Thanks much 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