博客页面标题格式

发布于 2024-12-20 06:28:23 字数 400 浏览 3 评论 0原文

请考虑博客中页面标题的以下格式:[博客名称].[页面名称]。 我曾经将以下代码放在标题标签中,但没有像某些编程站点中引用的标题标签:

<b:if cond='data:blog.pageType == &quot;index&quot;'>
<title><data:blog.title/></title>
<b:else/>
<title><data:blog.pageName/></title>
</b:if>

问题是我只得到 [页面名称] 而没有 [博客名称] 。非常感谢任何帮助。

Consider the following format for page title in blogger:[blog Name].[page Name].
I used to place the following code in the title tags and without the title tags as cited in some programming site:

<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.title/></title>
<b:else/>
<title><data:blog.pageName/></title>
</b:if>

The problem is that I get only [page Name] without the [blog Name]. Any help is greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不念旧人 2024-12-27 06:28:24

您不要在条件的 else 部分中包含博客名称。看看你的样本,你可能想要这个:

<b:if cond='data:blog.pageType == "index"'>
    <title><data:blog.title/></title>
<b:else/>
    <title><data:blog.title/><data:blog.pageName/></title>
</b:if>

You don't include the blog name in the else part of the conditional. Looking at your sample you probably want this:

<b:if cond='data:blog.pageType == "index"'>
    <title><data:blog.title/></title>
<b:else/>
    <title><data:blog.title/><data:blog.pageName/></title>
</b:if>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文