简体   繁体   English

如何显示当前页面标题或标签?

[英]How do I show the current page title or label?

How to show the current page title or label? 如何显示当前页面标题或标签?

I have tried with below code - 我尝试了以下代码-

<data:blog.searchLabel/>

Display the label when you are on URL search label only. 仅在URL搜索标签上时显示标签。 I need a code that displays HOMEPAGE when you are on homepage URL and shows Label of posts When you are on blogger posts !! 我需要一个代码,当您在主页URL上时显示HOMEPAGE,并在您在Blogger上时显示帖子标签!

I couldn't do that so I called another div that display the tags but its super bad since it gets doubled when I call it for no reason. 我无法执行此操作,因此我调用了另一个显示标签的div,但它的效果很差,因为当我无故调用它时它会加倍。

$(function(){
    $('.label-head a').clone().appendTo('.repheader');
   });

<div class='tm-menu'>
  <div class='body-row repheader'><data:blog.searchLabel/></div>
  <div class=label-head>
</div>

屏幕截图

I solved the problem by myself. 我自己解决了这个问题。

  1. I found two div s so I deleted one of them. 我找到了两个div所以我删除了其中一个。
  2. I found blogger tag that display the page title, here is a link which you might find helpful. 我发现显示页面标题的Blogger标记, 是一个可能会有所帮助的链接。

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

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