1
Husberry
Tag problem in my templates
  • 2006/5/22 0:05

  • Husberry

  • Just popping in

  • Posts: 10

  • Since: 2006/5/21


Hello,

I have a strange problem in my news template. This is the HTML/Smarty Code from my template file:

... file.

<
table width="100%" border="0">
<{
section name=i loop=$columns}>
    <{foreach 
item=topic from=$columns[i]}>
    <
tr width="<{$columnwidth}>%" class="simple">
        <
td class="piccell"><{$topic.img}></td><td class="desccell"><{$topic.topicdescription}></td>
        <
br />
    </
tr>
    <{/foreach}>
<{/
section}>
</
table>


As you can see there are no Tags between the Table and the last character, in this case a point. But after looking into my HTML output I can see this:

... file.<br>
<
br>
<
br>
<
br>
<
br>

<
table width="100%" border="0">
<
tbody><tr width="100%" class="simple">
        <
td class="piccell">
...


I don't know from where this 5 <br> tags come from? I compiled the template several times without success. I can't prevent XOOPS from inserting this <br> tags. But I know why there are 5 Tags. It seems that a tag is generated with every loop cycle. There are 5 table columns, so there are 5 <br> tags.

Can anybody help me to fix this annoying bug?

2
script_fu
Re: Tag problem in my templates

Out of curiosity and not in the templates but look in your theme... theme.html or blocks.html do you see the extra code?

<br>
<br>

?

3
Dave_L
Re: Tag problem in my templates
  • 2006/5/22 0:31

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You have a < br /> tag in the foreach loop.

4
Husberry
Re: Tag problem in my templates
  • 2006/5/22 1:33

  • Husberry

  • Just popping in

  • Posts: 10

  • Since: 2006/5/21


Quote:

Dave_L wrote:
You have a < br /> tag in the foreach loop.


Thank you very much Dave_L! You are right. It was the <br /> tag in my foreach loop. I removed it and the <br> tags disappeared. Is this a normal behavior? I mean why are the tags displayed before and not in the table? And why are the tags outputed as <br> and not as <br />?

5
Dave_L
Re: Tag problem in my templates
  • 2006/5/22 1:37

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The < br / > tag was inside the < table > < /table > tags, but not within a table cell. That can cause unpredictable behavior when the browser renders the HTML. But I don't know why the / disappeared.

6
Husberry
Re: Tag problem in my templates
  • 2006/5/22 1:47

  • Husberry

  • Just popping in

  • Posts: 10

  • Since: 2006/5/21


Quote:

Dave_L wrote:
The < br / > tag was inside the < table > < /table > tags, but not within a table cell. That can cause unpredictable behavior when the browser renders the HTML. But I don't know why the / disappeared.


Very interesting! However, Thank You For Your Help.

Regards
Marcus

7
diddly
Re: Tag problem in my templates
  • 2006/6/6 0:09

  • diddly

  • Just popping in

  • Posts: 32

  • Since: 2006/3/28


Hi,

Once I've made the modifications in the templates of some modules, how do refresh it or regenerate them so the newly modified pages can be viewed online? Thanks.

8
Bassman
Re: Tag problem in my templates
  • 2006/6/6 0:28

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Did you edit the original templates offline and re-upload them? Or clone the originals with the template manager?

Login

Who's Online

69 user(s) are online (38 user(s) are browsing Support Forums)


Members: 0


Guests: 69


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits