Pages

Friday, January 20, 2012

2

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.
[Hide comments] - [Show comments]
Click on a single comment to hide/show its text

2 comments:

Taufik Nurrohman said... [reply]

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...

Post a Comment

Related Posts Plugin for WordPress, Blogger...
See the hack
for this dynamic
views icon: