Support Forums

A bit of XHTML and Smarty

This is a discussion on A bit of XHTML and Smarty within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Why would this piece of code not validate XHTML 1.0 transitional. Any ideas? It really does not like it. {foreach ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 08-11-2008, 12:38 PM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,247
Rep Power: 53
seymourjames has a spectacular aura about
Default A bit of XHTML and Smarty

Why would this piece of code not validate XHTML 1.0 transitional. Any ideas? It really does not like it.

{foreach from=$pageNumber item="entry"}
{if $entry.number == $pageNum}
<td class="paginationNum"><strong>{$entry.number}</strong></td>
{else}
{if $entry.number == 1}
<td class="paginationNum"><a href="{$file}?{$entry.link}" title="{$newtitle}">{$entry.number}</a></td>
{else}*
<td class="paginationNum"><a href="{$file}?{$entry.link}" title="{$newtitle}- {$entry.number}" class="paginationNum">{$entry.number}</a></td>
{/if}
{/if}
{/foreach}
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is online now   Reply With Quote
Old 08-11-2008, 12:46 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,318
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

What is the error you are getting?
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 08-11-2008, 02:22 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,247
Rep Power: 53
seymourjames has a spectacular aura about
Default

Column 3: character data is not allowed here .
<td class="paginationNum"><strong>1</strong>

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

it only validates if I put the {$entry.number} in " " but then it prints them out.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is online now   Reply With Quote
Old 08-11-2008, 02:37 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,318
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

You could try this:
Code:
   <td class="paginationNum" style="font-weight: bold">{$entry.number}</td>
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 08-11-2008, 03:02 PM   #5
Coder
 
Join Date: Mar 2006
Posts: 4,984
Rep Power: 121
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by suzkaw
You could try this:
Code:
   <td class="paginationNum" style="font-weight: bold">{$entry.number}</td>
Did you want to pull the class designation out if your specifying the style details inline?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 08-11-2008, 04:39 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,247
Rep Power: 53
seymourjames has a spectacular aura about
Default

Sorry, none of these suggestions work. Same error. I cant see it even though I am looking at the XHTML guides.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is online now   Reply With Quote
Old 08-11-2008, 04:44 PM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,318
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

How about this:
Code:
<td class="paginationNum" style="font-weight: bold"><span>{$entry.number}</span></td>
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0