Newbies WalterC Posted February 24, 2004 Newbies Posted February 24, 2004 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
jonesy17 Posted February 24, 2004 Posted February 24, 2004 [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 :-)
Newbies WalterC Posted February 25, 2004 Author Newbies Posted February 25, 2004 That did the job -- thank you! -- Walter
taishi01 Posted March 9, 2004 Posted March 9, 2004 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.
Garry Claridge Posted March 9, 2004 Posted March 9, 2004 Try this: [FMP-If: CurrentToken .eq.] [include: filename.htm] [FMP-Else] [include: anotherFile.htm] [/FMP-If] Good Luck. Garry
taishi01 Posted March 9, 2004 Posted March 9, 2004 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]
Garry Claridge Posted March 9, 2004 Posted March 9, 2004 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.
taishi01 Posted March 10, 2004 Posted March 10, 2004 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now