Technical Blog

FreshTags’ Static Widgets

Posted on

This enhancement to FreshTags in response to Amit, who has been persistently requesting the feature in comments and a ticket. FreshTags now has the ability to generate widgets (from any source) which are locked on to a particular tag(s). For example:

<!-- FreshTags0.5-Singpolyma2 -->
<script type="text/javascript">
if(typeof(WidgetData) != 'object') WidgetData = {};
if(typeof(WidgetData['freshtags']) != 'object') WidgetData['freshtags'] = {};
WidgetData['freshtags']['freshtags_static'] = {
"username":" username",
"url":"blog url",
<script src="" type="text/javascript"></script>
<div id="freshtags_static"></div>
<a href="" title="Categories by FreshTags"><img alt="FreshTags" src=""/></a>
<!-- /FreshTags0.5-Singpolyma2 -->

The above code must (for new Blogger users) be inserted into a new HTML/JavaScript sidebar widget. Source (in red) must be either, blogger, or mediawiki (use blogger for labels on posts in the new Blogger). Defs (in red) should be a +-separated list of tags to load into the widget (or just one tag). Username (in blue) must be replaced with your username (if source is or the whole line must be removed. URL (in blue) must be replaced with the full URL to your Blogger blog (ie, if source is blogger or the whole line must be removed. Join_char (in blue) must be / if source is blogger and + otherwise.

The ID (in purple) is fine to leave if you are only going to insert this widget once. For the second, third, etc widgets you must change it to something like freshtags_static2. The higher reference (also in purple) to freshtags_static must also be changed. Second, third, etc widgets do not need the <script> tag that is in purple near the end.

If you have any questions, just ask!

19 Responses


Hi Stephen,

I have a few questions and was wondering if you could answer them.

a. What changes to the above code will allow me to add a line like “Select a movie” at the top of the drop-down list? (Similar to -Tags- on your blog here.)

b. Is it possible to have more than one drop-down list in the same widget? 😀

c. Would it be possible to host the JS code on my blog template instead of on ning, including a full credit to you? I’d prefer to have the code at a single domain/server if possible.


Stephen Paul Weber

Add a line like so:

“prompt”:”Select a Movie”,

Just below the line:


Yes, you can have more than one, read my second paragraph about changing the purple bits of the code.

Host it yourself if you like, just link back to me 🙂


>> Yes, you can have more than one, read my second paragraph
>> about changing the purple bits of the code.

I guess I wasn’t clear enough, or there is some confusion about the definition of a widget.

I can have more than one widget, but each widget can have only one drop-down list, right? The comments related to purple code are for adding new widgets.
If I want to have more than one drop-down lists within ONE widget, is that a possibility, if I repeat the code within the first set of tags?

>> Host it yourself if you like, just link back to me 🙂

That’s great! I will definitely link it back to you.
So, how do I get the script from you (which is hosted here:

PS BTW, the comments are still being eaten once a while by the rogue code 🙂

Stephen Paul Weber

It doesn’t matter if you create a new widget on your Blogger blog for the new code, or just paste the code more than once in the same widget, no, code is code.

To get that script, go to that URL and then cut-n-paste into script tags in your template/widget 🙂

PS – If you try to use funny characters like < or > without escaping them, you may get eaten 😉



Thanks for your suggestion, and it’s working fine. I have multiple drop-down lists within the same widget. Take a look:

One more question (hopefully, last one):) —
a. Is it possible to specify/fix the length of the drop-down list? Right now, they are of different lengths (I’m assuming it auto-adjusts based on the longest title for each label/tag) and I’d like them all to be of the same length.

Thanks again.


Great! Worked like a charm!! 🙂 🙂

Thanks soo much!



Does this limit the number of posts to 25? Take a look here:
and the drop-down list that says “List of Movies (A-Z)”
It does not show 5 movies in the list (I have 30 posts so far), and those 5 are the first 5. Just wondering if it will only show the latest 25 movies, or if I made a mistake somewhere.
Rest all drop-down lists are working fine! 🙂


Stephen Paul Weber

@Amit — I think I’ve now fixed that bug… but cannot test your situation because your blog has the code inline instead of from JScripts. Upgrade it and it should work 🙂


Thanks for the prompt response. I tried including your new code, but it didn’t show the drop-down lists. The code was posted between the includabe tag (‘quickedit’) for widget id=HTML4 at (that’s where I test the code/hacks). It’s the same place as in the new blog where the old code is.

So, I deleted the code, and instead, inserted the script source code lines to your URL for the source code in the widget for “List of All Movies”, and it’s still not working.

The last two drop-down lists are working but those were generated using the FreshTaggy wizard.




Yes that is correct. I modified the code at to refer to the code at JScripts (instead of being inline) and it is not showing the drop-down lists now.

Take a look when you get a chance. Glad that your blog is back up. 🙂




Hi Stephen,

Hope you landed a job. I would like to trouble you again to see if you’ve had a chance to figure out the limit of 25 post titles using your code. I now have posts (movie titles) that exceed 25, so some of them are not showing up in the drop-down list. Feel free to leave a comment on my blog. Also, if you feel like running some tests, my other blog does not embed code.




Oops, that should be “… figure out a way around the limit of 25 posts … “


Stephen, thanks for your response! C’est la vie, I guess. 🙂

Leave a Response