Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Include header error. help please!!

 

 


willydoit
User

Jun 26, 2009, 8:46 AM

Post #1 of 6 (1399 views)
Shortcut
Include header error. help please!! Can't Post

With little experience of coding I am attempting to get our existing article manager 2 to integrate within the css styles we use throughout the site, however I am finding that the include command to display our own header and footer do not work, looking at the page source view in explorer I can see that where the include code should be there is the message [an error occurred while processing this directive].

The header page is located in the root directory and I have tried both <!--#include file="/header.html" --> and <!--#include file="../../header.html" --> neither of which work. I am assuming that the path should be relevent to the finished location of the page ie the article2/publish directory just in case I have also tried <!--#include file="../../../../header.html" --> to take me out of the cgi-bin location but that doesnt work either (my cgi-bin is located outside of the public folder on a linux setup)

Could someone please advise a) where the path to display the header should originate b) perhaps offer some explanation as to why it doesn't work.

I would like to get this resolved over the weekend if someone can help.

Thanks in advance


Donna
Staff / Moderator


Jun 26, 2009, 2:25 PM

Post #2 of 6 (1396 views)
Shortcut
Re: [willydoit] Include header error. help please!! [In reply to] Can't Post

Hi there,

Try this:

<!--#include virtual="/header.html" -->

Include virtual works much better when the files aren't in the same directory. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


willydoit
User

Jun 27, 2009, 3:20 AM

Post #3 of 6 (1369 views)
Shortcut
Re: [Donna] Include header error. help please!! [In reply to] Can't Post

Hi Donna,

Thanks for your help, unfortunately that didn't work either, I have been doing some experimenting and none of my files are loading the headers when the file is in a sub folder, yet the php files work okay in sub folders for cms, I suspect it may be a server configuration issue but if you have any further thoughts I would be pleased to hear them as I am pulling my hair out at the moment. I have ruled out any coding conflicts by creating a blank page with an include statement, works in root but not a sub folder no matter what variant I use of the include statement. Pirate


Donna
Staff / Moderator


Jun 29, 2009, 12:53 PM

Post #4 of 6 (1352 views)
Shortcut
Re: [willydoit] Include header error. help please!! [In reply to] Can't Post

Hi there,

Hmm, yep, that sounds like a server configuration issue -- I'd recommend sending a copy of your test pages to your hosting provider and asking them what syntax you should be using.

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


willydoit
User

Jun 30, 2009, 12:24 AM

Post #5 of 6 (1350 views)
Shortcut
Re: [Donna] Include header error. help please!! [In reply to] Can't Post

Hi all,

In case it helps anyone else, we eventually sussed the problem, while I took your coding of <!--#include virtual="/header.html" --> literaly, assuming the / to start the path from the root, the only way we could get it to work was with <!--#include virtual="../header.html" --> or <!--#include virtual="../../header.html" --> using the full path, am I wrong in assuming that a single / dictates that the path starts from the root folder?

Thanks


Donna
Staff / Moderator


Jul 1, 2009, 11:12 AM

Post #6 of 6 (1341 views)
Shortcut
Re: [willydoit] Include header error. help please!! [In reply to] Can't Post

Hi there,

The initial slash should take it to the document root, not the server root, so it's odd that that wouldn't work.

I generally recommend using the initial slash as that'll make it work in any directory, but as long as you've got a solution that works for you, I say go with it. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.