Jump to content

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

Recommended Posts

Posted

Hi. I have a web page where I'm trying to use

[FMP-Include: header.htm]

(Data returned here)

[FMP-Include: footer.htm]

But they don't pull up the HTML, just the code itself. Is there a special trick to using FMP-Include? I really don't want to hard-code the header and footer into every file, but right now it looks like I'll have to.

I did put all the top HTML code in header.htm, including <html> and all the bottom HTML code in footer.htm, including </html>. Is that wrong?

Or is there someplace on the FMP server where FMP-Include has to be turned on? A Google search for [FMP-Include finds a lot of sites with broken code.

Any help appreciated.

Thanks.

Posted

In Include is just the standard CDML, HTML and JavaScript text code.

The full assembled page must have all HTML required code and without syntax errors.

Check that in browser in source mode.

Posted

Try putting the "html" and "/html" tags in the file with the [FMP-Include]. I had similar problems a couple of years ago. However, I can't remember exactly what it was. It did work once I resolved which file contains the outer html tags.

Good Luck.

Garry

Posted

Hi, G! Hmm... I used an include a long time ago in project I abandoned for another solution but didn't have trouble with the include; it worked great. I just used a text file, though, and only put in the exact code as though it were in the main page itself. Try omitting the <html> </html> as you suggest since the referring pages themselves should take care of that.

Keep at it, though... there's no special settings I had to do. Maybe try to do a simple include with no code at all... just a word or two.

Hope this helps! --ST

----------------- (edit/addendum) ---------------

LOL! Garry answered as I was typing my response, so I'd like to change mine to: "Yeah, what he said."

Posted

Thanks, guys. Found the solution. It seems that just pulling up a page with FMP-Include won't work any more than it will pull up data with direct access. It has to be a referral with data drawn for the tags to work.

That means my index (default) page has to have the includes hard-coded, but after that the other pages can use the include tag. It will work, but the downside is that to make header/footer changes, two files have to be edited instead of one. An Apache server include would take care of that, but apparently the FileMaker server has to be specially configured for Apache (I'm just the code writer, not the server admin!).

Posted

RE: but apparently the FileMaker server has to be specially configured for Apache

FMU has small Java applet for this -- Web Server Connector. But it is one way street. Apache or IIS will serve the dynamic CDML pages, but cannot send something to FM's Web Companion Web Server.

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