What's the deal with “data:post.url”, “data:post.title”, etc

梦想与她 提交于 2019-12-01 00:07:16

In this case, data: is a namespace that scopes the data available from Blogger that can be included in a template. The authoritative list of what's availabe is here.

It is Blogger-centric.

The other namespaces are b: which deals with layout and control flow, and expr: which keys the engine into the fact that the tags involve data from Blogger (as you have above).

A good tutorial is here.

In the Blogger template data:post.url returns the url of the current page,data:post.title returns the title of the post.These are terminologies are specific to the blogger API and hence these code would work in blogger template and nowhere else.

For example, typing <a expr:href='data:post.url'> in the blogger template,would give the output of <a href="http://urlofthepage">

So if I go to http://meow.blogspot.com/2011/03/ab.html the code which will appear in the source code will be <a href="http://meow.blogspot.com/2011/03/ab.html">

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!