I'm trying to get a splashbox to show ONLY on the home page between the navbar and the sidebar.
Here's a JSFiddle of what I'm trying to do..
As you can see, the splashbox is above the sidebar and content...
Now, here's the problem.
In Q2A, when I try to replicate this, the sidebar is always ABOVE the splashbox.
Here's my current code..
function main()
{
if ($this->request=='') {
$this->output('<div class="splashbox">');
$this->output('</div>');
} else
qa_html_theme_base::main();
}
function sidepanel()
{
$this->output('<div class="qa-sidepanel">');
$this->search();
$this->nav('cat', 1);
$this->feed();
$this->output('</div>');
}
That way, the splashbox only shows on the home page (as declared by the '')... and that works fine. But it's rendering the sidebar (sidepanel) first. I'm not sure why. I figured putting the sidepanel function below the splashbox function would make it render second but it didn't work. Any suggestions? Thanks!
It was pretty easy... I figured it out with some time of just looking over the code..
I realize that I was making a function "MAIN"... that means that it would replace the content portion of my Q2A with the splashbox. That's not what I wanted... I wanted it to insert the splashbox into the entire site.
In order to do that, I had to make a function BODY_CONTENT, not a function MAIN
So...
this is what it ended up looking like...