Saturday, September 6, 2008

Modifying templates

Donn is definitely confused with new blogger template :D

His question is, "How can I change text comments to something else?"

Before I start, I must warn you that you will be tampering with your blogger's template. Any customization already done on it might be lost. Please take backup of your template before you modify it.


For old template users –
Open up your template in an editor. Search for text <$I18NNumComments$>
Replace it with <$BlogItemCommentCount$> comments


For new template users –
You can replace <data:top.commentlabel> with comment
And <data:top.commentlabelplural> with comments

Notice the plural nature of the latter.


Hope you find the above texts easily :)
Noobs can stop reading here now =P



Caution:
When you replace the texts, try to pad the code with angle brackets with at least one space to its left and right ends. The reason is something like this - HTML is messy.
These patterns in blogger code are not treated nicely all the time.
>>
<<
><

There is high probability of not seeing the results in expected manner.

The correction can be done like this - by inserting a space in between the angle brackets.
>&nbsp;>
<&nbsp;<
>&nbsp;<


Now, just in case you are wondering where the heck is space here, I should tell noobs :P that &nbsp; is equivalent of single space character. Its better to code this way than relying on normal coding because the blogger engine is designed to work this way. Its simple and robust.
If you are not sure what ever code you wrote is going to be interpreted correctly by blogger, then use this site for converting it to blogger friendly (and not so human friendly) code.



You just need to read carefully the template. It would become very easy to modify the content once you take some time to understand the basic structure.
Read this for more help.

2 comments:

  1. Thanx.
    Next week let's figure out how to 'tweak' my site meter so that I can get some serious Ad income...




    just kidding.
    Repeat after me;

    Above all I must remain,
    The Master of my Domain!

    ReplyDelete
  2. Above all you must remain
    The Master of your domain.

    =D
    Naah.. I don't work for money. Thanks but no.. :P

    hehehe

    ReplyDelete

Talk to me :)