The Emotional Pumpkin

感情的な南瓜

Tuesday, March 08, 2005

Blog templates alert

I've had several e-mails from template users that the comment links in the post footer don't work. In all cases, the reason seemed to be an extra greater-than symbol (>); more on this later. So I checked (and rechecked, and checked again) my template code. It looked fine. I couldn't figure out what was going on. Today, however, I noticed that, even though the code on the server looks fine, most browsers seem to add the extra > character, I guess because they think the code is wrong. Here are the gory details: according to the Blogger reference on comment tags, the comments link in the post footer should look like this:


<a href="<$BlogItemCommentCreate$>"
<$BlogItemCommentFormOnClick$>>
<$BlogItemCommentCount$> comment(s)
</a>

And this is what I've put in my template code. Browsers seem to think the syntax is wrong, however, that the opening <a> tag is never closed properly, and add the extra > to fix the "error". So when you view the source for the template, you'd see the following (only sometimes, though, and this is another mystery to me):

<a href="<$BlogItemCommentCreate$>">
<$BlogItemCommentFormOnClick$>>
<$BlogItemCommentCount$> comment(s)
</a>

So the moral of the story, kids, is that when you copy the template source, watch out for that extra > symbol and remove it if a good samaritan web browser has added it. Note that I've also posted this information on the blog templates download page.

4 Comments:

Blogger silveraven said...

i really like your designs...but when i want to use it, it doesn't seem to be in the middle of the page. is there any way to remedy that? my microsoft frontpage seems to be missing so i can't play around too much with the html.

thanks

1:55 AM  
Blogger Richa said...

Which design are you trying to use? If you're trying to use Bubbles, the content is aligned on the left of the page by design. All the other ones should be aligned in the center.

11:47 AM  
Blogger silveraven said...

i was trying to use the Neon one. it wasn't aligned to the center. i'm using 1024 x 768 resolution so maybe THAT's the reason why...

7:52 AM  
Blogger Richa said...

Well, the page width is 750 pixels wide in all my templates. 1024x768 is the minimum resolution they'll look good in. More than likely the low resolution causes the content to look like it's aligned to the left since there's not much space around the content for buffer in the browser window. And that's if you maximize your browser window; if the window is smaller than your screen, you'll definitely see the content squashed up against the left side, with scrollbars so you can see the rest of the content.

8:05 AM  

Post a Comment

<< Home