Pages

Friday, January 20, 2012

Templates: blogID in posts widget layout data tag

This might be quite new feature, I just discovered it today (by browsing through template sources): blogID is now available in posts widget in the layout data tag "data:top.id". So if you are making Blogger hacks or templates, you can use this instead of telling users to edit their blogID into the code.

2 comments:

  1. You can just use <data:blog.blogId/>. Found from the widget manager script at the bottom of the page:

    <script type='text/javascript'>
    if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = "templatesV1";window['blogger_blog_id'] = 'XXXX';BLOG_attachCsiOnload('item_'); }_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3dXXXX','//www.dte.web.id/2012/11/recent-comments-widget-for-blogger-with.html','XXXX');
    _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': 'XXXXXXXXXXXXXXXXX', 'blogg...

    ReplyDelete

Smileys :) ;) :P :D :( and ;( are converted to graphical emoticons in the blog.