如何将网址调整为HTML而不是<a href="">?

时间:2017-12-02 00:30:48

标签: javascript html facebook twitter blogger

I want to put social links to author box in blogger, There is many of authors in the blog, Google call the Google+ profiles by the code :

expr:href='data:post.authorProfileUrl' 

Instead of <a href="">

The problem is I just can add one fb or twitter author profile by using <a href=""> . Is it an solution to give the authors social links an ID and call it into the HTML ?

The Blogger Author box code :

<li><a class='external external-link' href='#' rel='nofollow' target='_blank'><i class='fa fa-facebook'/></a></li>

<li><a class='external external-link' href='#' rel='nofollow' target='_blank'><i class='fa fa-twitter'/></a></li>

<li><a class='external external-link' expr:href='data:post.authorProfileUrl' rel='nofollow' title='Google+' target='_blank'><i class='fa fa-google-plus'/></a></li>

1 个答案:

答案 0 :(得分:0)

无法从Blogger获取Google+以外的作者社交链接,但您可以使用条件语句通过作者进行检查,并向特定作者显示某些内容

<b:if cond='data:post.author == "first author name"'>
  <!-- first author social links -->
<b:elseif cond='data:post.author == "second author name"'>
  <!-- second author social links -->
</b:if>