Monday, November 15, 2010

Testing Some HTML in Blogger

I have written a couple of posts on how to change some settings on Blogger using html. I never knew how to simply insert the code in the post without taking a screenshot. You know, when you write in the code, it actually does what you are writing. Get it?

I am trying something here that might explode my whole blog, but luckily I have backed up every day for the past two weeks because I was ditching code and tightening things up almost every day since the new template.
Let's try this...

I was asked how I made the dropdown labels on the sidebar and it used to be hard as crap. You had to post a full Label widget, then find it in the template, copy ALL of the code there and then insert some other junk. I found a better way that keeps the widget intact and it still updates the counts, too, which the other way did not do automatically.

First, back-up your blog template. ALWAYS.

You must have the Labels Widget already added to your template, by the way.

Then find this code...(Use Control F, you know?)


<b:loop values='data:labels' var='label'>


<b:if cond='data:blog.url == data:label.url'>



<a expr:href='data:label.url'><></a>






Simply replace the code above with this code...

<select onchange='location=this.options[this.selectedIndex].value;' style='width:100%'>

<option>Browse By categories</option>

<b:loop values='data:labels' var='label'>

<option expr:value='data:label.url'><>





And that is all there is to it. Also, the new "Codeview" works! And it appears everything else still works, too! Simply cut and paste, y'all. Now, back to our regularly scheduled mediocrity.

Please take the time to comment.


Moogie P said...

I'm sure this was a very helpful and enlightening post, but I'm afraid I don't speak -- or read -- Greek.

Paul Mitchell said...

I hope it helped out the asker.

saland said...

It's a good article! You let me learn more about it! In part time,I always log in the same websites to learn knowledge!Everybody all could communicate on ysl shoes for sale
. If want,please join us!

Bushwack said...

One of the reasons I went to wordpress (My own host) was the coding ability. IF you ever get a chance I'd strongly suggest you go that route. You obviously have a good grasp of HTML so you'd love the wordpress system on your own server. Gives you the world compared to Blogger.

Paul Mitchell said...

Bushwack, I am certainly not much of a coder, but I like to dabble with it on this free blog. My two business blogs are on a self-hosted Wordpress server and for the life of me, every time I change something, BAM! it's gone. It might take my five years to get the hang of Wordpress, too.