简体   繁体   English

如何将URL而不是HTML调用<a href=“”>?</a>

[英]How to call an URL into HTML instead of <a href=“”>?

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 : 我想在博客中将社交链接添加到作者框中,博客中有很多作者,Google通过以下代码调用Google+个人资料:

expr:href='data:post.authorProfileUrl' 

Instead of <a href=""> 代替<a href="">

The problem is I just can add one fb or twitter author profile by using <a href=""> . 问题是我只能使用<a href="">添加一个fb或twitter作者个人资料。 Is it an solution to give the authors social links an ID and call it into the HTML ? 是否为作者的社交链接提供一个ID并将其调用到HTML中是一种解决方案?

The Blogger Author box code : Blogger作者框代码:

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

There is no way to get author social links other than Google+ from Blogger but you can check by author using a conditional statement and display certain content with particular author 除了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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM