• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Can someone explain FP "include" files in detail to me?

I come from programming in ColdFusion where an include is does nothing more than include the file as pure text and nothing more.  I had a file that has some javascript in the page and some calls to external javascript files.  I wanted to break out the header and the footer and use them as includes and then just edit the content in between.

So I broke out my header file with the start html tag, the head tags, the start body tag and the calls to the two external javascript files.

Then my footer file has the ending body and html tags with my footer images.

Now my final page looks like this.
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" -->
Content goes here
<!--webbot bot="Include" U-Include="footer.htm" TAG="BODY" -->

Bottom line is that it worked when it was one file but the javascrip fails when it is broken out like I did.
0
Soulive
Asked:
Soulive
1 Solution
 
ClassyLinksCommented:
When you run the page in a browser and look at the code what do you see?

What I think you will find is that you now have 2 sets of <head> tags.

FP is really a PITA about shoving that head info onto the page.  It doesn't read the content of your "included files" and just assumes that it needs to add the head tags etc.  No way around this I'm afraid.  I don't even think that editing the "host" page in notepad would do any good.  But I could be wrong there.

The better way to include your files is not by using the bot.

With ASP pages, I do it this way.

<!--#include file="header.htm"-->
Content goes here
<!--#include file="footer.htm"-->


HTH
0
 
ClassyLinksCommented:
Soulive....did this information help?
0
 
SouliveAuthor Commented:
I was sort of waiting for the technical explanation of what FP does.  That's why I priced it out at 100pts.  Your suggestion did help me but it didn't completely solve my problem.  Is there a way to give you partial points?
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
ClassyLinksCommented:
Sure...post a 0 point question in Community Support.  A moderator will stop by and reduce the points then you can accept the answer.

However, what kind of technical explanation are you looking for?  A work around?  There really isn't a pure FP work around.

The problem is that FP puts that head info in each page you open with the editor....the only way to avoid it that I know of is to work in pure HTML mode.
0
 
ComTechCommented:
As reuqested by the author of the question, the points were lowered by 50%.

ComTech
Community Support
0
 
LunchyCommented:
Hi Classy,

Soulive has requested a point reduction to 50 in order to award you partial points on this question.  Sound fair to you?
0
 
ClassyLinksCommented:
Holy jumping...you guys are fast!

Yes, it's ok with me, as I posted the suggestion. ;-)

You're so fast that I didn't get a chance to see exactly what soulive wanted.  Oh well....Soulive, if you still want more info, I can try to provide it for you, even though this question is now closed.

Just a hint for future reference though.....EE works best when there is ongoing conversation between the questioner and the Experts.  Had you mentioned that my suggestion was not exactly what you were looking for in the beginning, it likely wouldn't have gone so long without a satisfactory answer for you.


Cheers!
0
 
ComTechCommented:
Hi Lunchy, pretty good service I'd say.  :-)

Thanks ClassyLinks

ComTech
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now