博客代码数据:post.Url用作带有图像按钮的可点击链接

Blogger code data:post.url used as clickable link with an image button

本文关键字:按钮 图像 链接 作带 数据 代码 post Url      更新时间:2023-09-26

我的网站是logjik.com。我在帖子中有两个社交按钮,它们也显示在我的主页上,我使用了这个解决方案,因为即使我在主页上,我也可以分享我的帖子链接(类似于9gag是我的主页):

.shr-btn-scl .twitterbtn{background-image:url(http://i.imgur.com/waBaJl0.png); display:block; background-repeat:no-repeat;
    height:42px;  
    width:185px;}
.shr-btn-scl .facebookbtn{background-image:url(http://i.imgur.com/XNIyP7z.png);display:block;
    height:42px;
    width:185px; background-repeat:no-repeat;
}

<div class='shr-btn-scl'>
<div class='btncontainer'>
<ul class='share-story'>                         
                            <li><a class='facebookbtn' data-title='Facebook' expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url + &quot;&amp;title=&quot;+ data:post.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow'/>
                            </li>
                            <li>
                              <a class='twitterbtn' data-title='Twitter' expr:href='&quot;http://twitter.com/share?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow'/>
  </li>                                                  
  </ul>
  </div>
    </div>

和我想添加第三个按钮只是与一个可点击的图像发送我从主页到帖子点击。是否有一种使用数据的方法:post。Url链接与可点击的图像?我如何使这段代码工作:

`<a href="data:post.url" title=""><img border="0" src="http://i.imgur.com/ivHxNCj.jpg"/></a>`

我找到了一些可能对你有帮助的东西。

我以为你说的是Blogger模板。如果是这样,应该可以工作:

<a expr:href="data:post.url" title=""><img border="0" src="http://i.imgur.com/ivHxNCj.jpg"/></a>