问题描述
会有人这么好心来解释这个数据对象是什么(如果它是一个对象),如果有任何文件就可以了。
Would someone be so kind as to explain what this data object is (if it is an object) and if there is any documentation on it.
我添加社交分享按钮的应用程序和决定,我希望把共享到Blogger按钮在那里,只是为了好玩。我找不到一个网页,有一个官方的份额到Blogger按钮,像Facebook有喜欢按钮,或Twitter,一个鸣叫按钮的官员。什么我发现是这样的与连接的文本文件。我注意到大多数,如果不是所有的HTML标签中使用数据:post.url'和'数据:post.title动态抓取博客文章的网址和标题
I was adding social sharing buttons to an app and decided I wanted to put a share to Blogger button on there, just for the fun of it. I could not find a page that had an official 'share to Blogger' button, like Facebook has an official 'like' button, or Twitter, a 'tweet' button. What I did find was this post on adding sharing buttons to a blog with the attached text file. I noticed that most, if not all of the html tags use the 'data:post.url' and 'data:post.title' to dynamically grab the URL and title of the blog post.
例如:
<a expr:href='"http://reddit.com/submit?url=" + data:post.url + "&title=" + data:post.title' target='_blank' title='Share On Reddit !'><img alt='Share On Reddit !' src='http://1.bp.blogspot.com/_YUvD9j84Cik/TBvM2-Sw3ZI/AAAAAAAAAHk/QKghefISkNc/reddit.gif' style='width:16px; height:16px; padding:0; border:0; vertical-align:middle;'/></a>
<a expr:href='"http://www.blogger.com/blog_this.pyra?t" + "&u=" + data:post.url + "&n=" + data:post.title + "&pli=" + 1' target='_blank' title='Post To Blogger !'><img alt='Post To Blogger !' src='http://1.bp.blogspot.com/_YUvD9j84Cik/TBvMqnnrVtI/AAAAAAAAAG8/O65EnRFSHFk/blogger.gif' style='width:16px; height:16px; padding:0; border:0; vertical-align:middle;'/></a>
<a expr:href='"http://www.friendfeed.com/share?link=" + data:post.url + "&title=" + data:post.title' target='_blank' title='Share On Friend Feed !'><img alt='Share On Friend Feed !' src='http://1.bp.blogspot.com/_YUvD9j84Cik/TBvMxcy7H8I/AAAAAAAAAHU/UfNllYiyznA/friendfeed.gif' style='width:16px; height:16px; padding:0; border:0; vertical-align:middle;'/></a>
当寻找到这个StackOverflow上,我发现,我们建议使用人social评论和share 谁正与分享他们的网址问题的按钮,不过,值得注意的是,没有一个答案已经被标记为正确。
When looking into this on stackOverflow, I've found that it is suggested for people using social comments and share buttons who are having issues with sharing their URLs, though, it is notable that none of the answers have been marked correct.
这是不是被严格限制于在Blogger / Blogspot的平台,或者是它的东西是由浏览器来处理?我一直没能找到在DOM任何引用数据或交。我很想知道如何可以更广泛地使用,它是否应该在所有被使用。
Is this something that is strictly limited to the Blogger/Blogspot platforms, or is it something that is handled by the browser? I haven't been able to find anything in the DOM referring to data or post. I'd be interested to know how this can be used more broadly and if it should be used at all.
推荐答案
在这种情况下,数据:
是作用域可以包括可从博客的数据的命名空间在模板。一个什么样的速效。
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.
这是博客为中心的。
其他的命名空间是 B
这与布局和控制流,而 expr的交易:
哪些键发动机到一个事实,即标签从Blogger中涉及到的数据(如你有以上)。
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).
有一个很好的教程。
这篇关于这是怎么回事用&QUOT;数据:post.url&QUOT;,&QUOT;数据:post.title&QUOT ;,等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!