Generated template - extra td's inserted

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
marco

Generated template - extra td's inserted

Post by marco »

I used the full-layout.html to generate a template. When I look at the generated page in the browser (without content to make it easier), I see a layout that does not quite match the original html file:

- The header and footer do not span the last column
- There is an extra column inserted in the before the main section
- There are narrow 1px white rows beween the spacers and header/footer

I compared the original html file withe data I inserted in the admin template very carefully: they are identical.

Next, I examined the source of the generated page in the browser: I noticed that there are indeed extra td's and even an extra html header. If I delete them, I get the page exactly as expected, but only if in the page layout I have the total width 500, left 100, main 280 and right empty. If I add a value of 100 for the right colum to get the total of 500 (100+10+280+10+100), I get yet an extra column inserted and the page layout breaks again.

Is this a bug, or am I missing something?

I can not find the generated file in the filesystem to fix it, and the phwcms source code is too complex for me to figure out where the foreign code that breaks the layout comes from.

I can send you the exact copy of the files and jpg of pages if it helps to figure out what the problem is.

M.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Please post the complete generated source here or give a link. I think you have made a mistake in your template configuration.

Never put

Code: Select all

<html><body></body></html>
or such code into the template blocks. Every cell in sample layout pages represents a template block input textarea. When you insert tables inside such template block it must be a complete well formatted HTML table code:

Code: Select all

<table><tr><td></td></tr></table>
Never do something like this:

Code: Select all

<tr><td></td></tr>
Every template block content must be clean HTML code - check it by putting this snippet of template code into a stand-alone html page. Only if this is correct you should put it into your template.

phpwcms will render the complete HTML source with <html><head></head><body></body></html>. These tags can be used only once per page ;-)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
marco

Post by marco »

:D You are absolutely right, at first I just copied parts of the sample html file and inserted them in the template blocks. This was not the right thing to do!

It was not ovious to me that I have to insert a complete table structure in each block. It is not only clear now, it is also logical!

The other thing I did wrong: I inserted the html prologue into the "html head"
block. This resulted in double code - the generated one, plus the inserted one.

Now I have the entire layout and content, as expected, and I can only say, this is a superb piece of work; there is nothing quite like it, and I looked at over 50 Open Source CSM/blog scripts.

I can hardly wait for the next version with the features you are planning!
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

:D Good news on Sunday morning.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Locked