Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FMP-Include doesn't seem to work

Featured Replies

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.

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.

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

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

  • Author

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!).

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.