I'm having a frustrating issue. This may be because I don't entirely understand PHP or how this theme template works.
The only way I can get the home page to display correctly is to specify a static page as the home page. If I use "node" for the front page in order to display teasers, the divs display incorrectly. Let me illustrate:
Proper display of divs (removing unaffected ones):
<div>Pagecontainer
<div>container
<div>main</div>
<div>footer</div>
</div>
</div>What is happening on the node front page is this:
<div>Pagecontainer
<div>container
<div>main
<div>footer</div>
</div>
</div>
</div>Basically, the footer div should be directly after the main div, but on the "node" home page it gets moved to INSIDE the main div.
I've looked at node.tpl, page.tpl, and template.php, and just can't seem to make sense of it. What am I missing?
Any help is much appreciated.
Comments
Comment #1
nickbits commentedHi,
The divs are not in the order you have shown in the code so can only assume it is a problem with your software. However, it may well be that I am missing something. I have been unable to re-create the problem so a few questions to help me re-create the problem:
1. What version of Drupal are you using? (5.9?)
2. With all of the default settings, does the frontpage display correctly (i.e. without specifying node or having any othe custom settings)?
3. Can you walk me through how you are setting the front page to display teasers? (this should be the default setting)
4. Can you tell me what browser(s) you are using?
5. Can you tell me what webs erver software you are using?
6. Can you copy the rendered HTML code in it's entirity into a post and let me have?
Cheers,
Nick
Comment #2
halfiranian commentedIs this something to do with the 5.9 update?
I was using 5.7 and there seems to be an extra div coming in somewhere. I have to remove a closing div from my node.tpl.php file (and others) if the pages are to display correctly.
does anyone know what's going on?
Comment #3
nickbits commentedHi,
Can you provide more information please as I cannot replicate this? My system works fine, so the more information you can provide me with (see my previous post), the better I am able to track the problem down.
Cheers,
Nick
Comment #4
halfiranian commentedNickbits,
I think I've tracked the problem down to an update I made to the fivestar module...
sorry,
James
Comment #5
nickbits commentedHi,
No problem. Just for reference, can you confirm that it was the Fivestar module causing the problem?
Regards,
Nick
Comment #6
nickbits commentedComment #7
halfiranian commentedHi Nick,
Yes, I can confirm that it was fivestar that was causing the problem. I haven't had time to figure out exactly how, but by reverting to an older version of the module my 'extra div' disappeared.
Cheers,
James
Comment #8
GreenStage commentedThanks for helping on this, I just sidestepped the problem by not using "node" as the home page... not the best, but it works.