簡體   English   中英

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

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

我想在博客中將社交鏈接添加到作者框中,博客中有很多作者,Google通過以下代碼調用Google+個人資料:

expr:href='data:post.authorProfileUrl' 

代替<a href="">

問題是我只能使用<a href="">添加一個fb或twitter作者個人資料。 是否為作者的社交鏈接提供一個ID並將其調用到HTML中是一種解決方案?

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>

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