Wednesday, December 19, 2007

Searching for section of codes in template

Various posts have been published about editing the template to achieve various objectives or hacks such as Expandable Post Summary for New Blogger, etc. To implement such hacks, you have to go into the template itself rather than using the Page Elements in the LAYOUT, a method much more user friendly for those who are not comfortable with HTML, etc. Also, you will be required to search through long lines of codes in the template. Bloggers often have problems searching for the particular section of the codes.

Use Find function in task bar (ctrl+F)

One way you can easily find the code is to highlight a part of the code, for example, if you are looking for this block of codes:

<b:include data='post' name='postQuickEdit'/>
</span>
</p>

perhaps you can highlight

quickedit pencil

click ctrl+F and a "Find" box will appear at the left bottom corner of the task bar, type or paste what you find into the "Find" box, and the phrase quickedit pencil will be located for you as shown in the screenshot below (click on screenshot if you want to see an enlarged and clearer version of the screenshot):

use FIND function ctrl+F to search for some text or code

Acually, the screenshot above is not searching for something in the template, but just an example I use while preparing this post and as you can see, it can also be used to locate words or phrases in the post editor, not just the template editor. I the above example, I used "quickEdit" to illustrate. If that section is not what you are seeking, just keep on clicking "Next" until you find what you are looking for.

Using the "Find" function in Notepad

If you find the above method not working for the web browser you are using, there is another way to do it using Notepad. In the template editor, click on the inside of the template editor, right-click and choose "Select all to highlight all of the template. Right-click again and select "cut". You will end up with an empty template editor, but the template will be stored in the clipboard. Open a Notepad file, click inside the Notepad file, right-click and select "Paste" and the whole template will then be transferred to the Notepad file.

To find what you are looking for (example "

No comments: