I am currently having problems with the search.tpl template. I have 3 link types set up: sponsored, reciprocal, and regular. I also want them to be displayed in that order. So in the template, I have created code specific to each link type. The ordering part seems to be working well.
What I don't understand is why extra <tr> tags are being generated. For example, the sponsored section of starts like this in my search.tpl template:
<!-- BEGIN SEARCH links RESULTS --> <table><tr> <!-- BEGIN SPONSORED --> <td>
But what gets output in HTML is this (note the two extra opening <tr> tags):
<!-- BEGIN SEARCH links RESULTS --> <table><tr> <tr><tr><!-- BEGIN SPONSORED --> <td>
The next section, for reciprocal links, starts out okay but then looks goofy at the end. The end of the section looks like this in the template:
</td> <!-- END RECIP --> </tr></table>
But this is what gets output as HTML (note the extra closing and opening <tr> tags):
UPDATE: I've done some more testing and discovered that if I set "Separate sponsored links from other types and don't count towards per page total?" to NO, then I don't have the problem of extra <tr> tags at the start of the sponsored section.
Now what I have are the extra tags as described just above in the reciprocal section. That happens in all 3 sections: sponsored, reciprocal, and regular. At least it's technically valid HTML so I can probably live with it.
Comments on Confused about looping in search.tpl
Member
Usergroup: Customer
Joined: Dec 12, 2005
Total Topics: 11
Total Comments: 19
I am currently having problems with the search.tpl template. I have 3 link types set up: sponsored, reciprocal, and regular. I also want them to be displayed in that order. So in the template, I have created code specific to each link type. The ordering part seems to be working well.
What I don't understand is why extra <tr> tags are being generated. For example, the sponsored section of starts like this in my search.tpl template:
But what gets output in HTML is this (note the two extra opening <tr> tags):
The next section, for reciprocal links, starts out okay but then looks goofy at the end. The end of the section looks like this in the template:
But this is what gets output as HTML (note the extra closing and opening <tr> tags):
--------------------------------------------------------------------------
UPDATE: I've done some more testing and discovered that if I set "Separate sponsored links from other types and don't count towards per page total?" to NO, then I don't have the problem of extra <tr> tags at the start of the sponsored section.
Now what I have are the extra tags as described just above in the reciprocal section. That happens in all 3 sections: sponsored, reciprocal, and regular. At least it's technically valid HTML so I can probably live with it.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed for 3.3.7. Note: involves taking the <tr> and </tr> out of the template.