Including theme header in non-theme pages

Permalink
Hello,

Hoping someone here can help me, because I'm banging my head against a wall for a couple months now. I'll attempt to describe my problem from the beginning;

So, I run a concrete5 website and recently installed WHM Autopilot. I installed autopilot into the root of my site and it's accessible viahttp://www.mysite.com/autopilot... (not the real site obviously).

Where my dilemma has occurred is when i attempt to include my site's concrete5 header into pages drawn from the autopilot folder.

I followed their very basic instructions in an attempt to include my sites header into their pages. Basically the instructions say to make a copy of your original (concrete5) header, save it as 'header2.php' within the WHM 'inc' folder, and place a statement to 'include('inc/header2.php')' at the bottom of their (WHM's) header file.

So that was easy enough, however Murphy's law prevails and it is never that simple. When attempting to load the page, it would instantly 'die' as 'C5_EXECUTE' was not defined. Good enough, I added the statement
<?php define ("C5_EXECUTE", true); ?>
Problem somewhat solved.

Loading the page again, it encountered problems with the
<style type="text/css">@import "<?php echo $this->getStyleSheet('main.css')?>";</style>
<style type="text/css">@import "<?php echo $this->getStyleSheet('typography.css')?>";</style>
so I did a little research and changed this to
<link rel="stylesheet" type="text/css" href="../packages/theme_loadfoov2/themes/loadfoov2/main.css")/>
<link rel="styleshet" type="text/css" href="../packages/theme_loadfoov2/themes/loadfoov2/typography.css")/>
which no longer produces an error. It now loads my the beginning of my header, but fails attempted to load the javascript header nav.

The latest error is a "Fatal error: Class 'Area' not found" in regards to the following code
<?php
                $a = new Area('Header Nav');
                $a->display($c);
                ?>


There must be a way to allow this header to run outside of my regular site. I'm assuming I simply need to include something else and it'll work, but i'm not sure what. Or perhaps there is something I've done wrong? Or am I missing something huge? Any suggestions are greatly appreciated to get this resolved, as even WHM won't help me to get it configured.

Thanks in advance and look forward to hearing any thoughts anyone has.

Cheers,
Geek Monkey

geekmonkey
 
Lestat69 replied on at Permalink Reply
I would also like to know how to integrate the 2 of these together
geekmonkey replied on at Permalink Reply
geekmonkey
Hey Lestat69,

As can be seen, I never did receive a response from anyone with Concrete5 on how to accomplish this.

In the end, I gave up and built a stand-alone php copy of my header to use within WHM AutoPilot. It looks alright (almost identical to my actual header), but I have to remember to edit this second header manually should I ever change my sites header. I likewise did the same for the footer.

Not my ideal solution, but a work-around that at least gets me functional.

Good luck getting yours integrated!

Cheers,
Geek Monkey
jordanlev replied on at Permalink Reply
jordanlev
You cannot have Concrete5-specific code outside of a Concrete5 site.
geekmonkey replied on at Permalink Reply
geekmonkey
Hi jordanlev,

That's what I concluded from my many many hours of troubleshooting. Wish someone had mentioned that 4 months ago while I was pulling my hair out looking for a solution. Better late than never however.

Cheers,
Geek Monkey